From dba5ab4dbd3fab8d020345ade67c69bb8ab32736 Mon Sep 17 00:00:00 2001 From: Paul Nicolas Date: Tue, 1 Apr 2025 14:17:16 +0200 Subject: [PATCH] feat(events): fix generated files and add payments v3 events (#1757) --- libs/events/generated/all.json | 3909 ++++++----------- .../payments/v2.0.0/CONNECTOR_RESET.json | 12 +- .../payments/v3.0.0/CONNECTOR_RESET.json | 43 + .../payments/v3.0.0/DELETED_POOL.json | 44 + .../payments/v3.0.0/SAVED_ACCOUNT.json | 75 + .../payments/v3.0.0/SAVED_BALANCE.json | 66 + .../payments/v3.0.0/SAVED_BANK_ACCOUNT.json | 96 + .../payments/v3.0.0/SAVED_PAYMENT.json | 114 + .../v3.0.0/SAVED_PAYMENT_INITIATION.json | 90 + .../SAVED_PAYMENT_INITIATION_ADJUSTMENT.json | 63 + ...ED_PAYMENT_INITIATION_RELATED_PAYMENT.json | 43 + .../generated/payments/v3.0.0/SAVED_POOL.json | 55 + libs/events/index.js | 3 +- .../payments/v2.0.0/CONNECTOR_RESET.yaml | 10 +- .../payments/v3.0.0/CONNECTOR_RESET.yaml | 9 + .../payments/v3.0.0/DELETED_POOL.yaml | 10 + .../payments/v3.0.0/SAVED_ACCOUNT.yaml | 32 + .../payments/v3.0.0/SAVED_BALANCE.yaml | 27 + .../payments/v3.0.0/SAVED_BANK_ACCOUNT.yaml | 44 + .../payments/v3.0.0/SAVED_PAYMENT.yaml | 58 + .../v3.0.0/SAVED_PAYMENT_INITIATION.yaml | 44 + .../SAVED_PAYMENT_INITIATION_ADJUSTMENT.yaml | 23 + ...ED_PAYMENT_INITIATION_RELATED_PAYMENT.yaml | 9 + .../services/payments/v3.0.0/SAVED_POOL.yaml | 18 + 24 files changed, 2266 insertions(+), 2631 deletions(-) create mode 100644 libs/events/generated/payments/v3.0.0/CONNECTOR_RESET.json create mode 100644 libs/events/generated/payments/v3.0.0/DELETED_POOL.json create mode 100644 libs/events/generated/payments/v3.0.0/SAVED_ACCOUNT.json create mode 100644 libs/events/generated/payments/v3.0.0/SAVED_BALANCE.json create mode 100644 libs/events/generated/payments/v3.0.0/SAVED_BANK_ACCOUNT.json create mode 100644 libs/events/generated/payments/v3.0.0/SAVED_PAYMENT.json create mode 100644 libs/events/generated/payments/v3.0.0/SAVED_PAYMENT_INITIATION.json create mode 100644 libs/events/generated/payments/v3.0.0/SAVED_PAYMENT_INITIATION_ADJUSTMENT.json create mode 100644 libs/events/generated/payments/v3.0.0/SAVED_PAYMENT_INITIATION_RELATED_PAYMENT.json create mode 100644 libs/events/generated/payments/v3.0.0/SAVED_POOL.json create mode 100644 libs/events/services/payments/v3.0.0/CONNECTOR_RESET.yaml create mode 100644 libs/events/services/payments/v3.0.0/DELETED_POOL.yaml create mode 100644 libs/events/services/payments/v3.0.0/SAVED_ACCOUNT.yaml create mode 100644 libs/events/services/payments/v3.0.0/SAVED_BALANCE.yaml create mode 100644 libs/events/services/payments/v3.0.0/SAVED_BANK_ACCOUNT.yaml create mode 100644 libs/events/services/payments/v3.0.0/SAVED_PAYMENT.yaml create mode 100644 libs/events/services/payments/v3.0.0/SAVED_PAYMENT_INITIATION.yaml create mode 100644 libs/events/services/payments/v3.0.0/SAVED_PAYMENT_INITIATION_ADJUSTMENT.yaml create mode 100644 libs/events/services/payments/v3.0.0/SAVED_PAYMENT_INITIATION_RELATED_PAYMENT.yaml create mode 100644 libs/events/services/payments/v3.0.0/SAVED_POOL.yaml diff --git a/libs/events/generated/all.json b/libs/events/generated/all.json index b3f078cb17..9960d34daa 100644 --- a/libs/events/generated/all.json +++ b/libs/events/generated/all.json @@ -22,120 +22,70 @@ }, "payload": { "type": "object", - "required": [ - "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" - ], "properties": { - "id": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { + "ledger": { "type": "string" }, - "relatedPayments": { - "type": [ - "array", - "null" - ], + "transactions": { + "type": "array", "items": { "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { + "postings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "destination": { + "type": "string" + }, + "amount": { + "type": "number" + }, + "asset": { + "type": "string" + } + }, + "required": [ + "source", + "destination", + "amount", + "asset" + ] + } + }, + "reference": { + "type": "string" + }, + "metadata": { + "type": "object", + "properties": {}, + "required": [] + }, + "txid": { + "type": "number" + }, + "timestamp": { "type": "string" } - } + }, + "required": [ + "postings", + "reference", + "metadata", + "txid", + "timestamp" + ] } } - } + }, + "required": [ + "ledger", + "transactions" + ] } }, "required": [ @@ -167,120 +117,120 @@ }, "payload": { "type": "object", - "required": [ - "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" - ], "properties": { - "id": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" + "ledger": { + "type": "string" + }, + "revertedTransaction": { + "type": "object", + "properties": { + "postings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "destination": { + "type": "string" + }, + "amount": { + "type": "number" + }, + "asset": { + "type": "string" + } + }, + "required": [ + "source", + "destination", + "amount", + "asset" + ] + } + }, + "reference": { + "type": "string" + }, + "metadata": { + "type": "object", + "properties": {}, + "required": [] + }, + "txid": { + "type": "number" + }, + "timestamp": { + "type": "string" + } + }, + "required": [ + "postings", + "reference", + "metadata", + "txid", + "timestamp" ] }, - "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" + "revertTransaction": { + "type": "object", + "properties": { + "postings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "destination": { + "type": "string" + }, + "amount": { + "type": "number" + }, + "asset": { + "type": "string" + } + }, + "required": [ + "source", + "destination", + "amount", + "asset" + ] } + }, + "reference": { + "type": "string" + }, + "metadata": { + "type": "object", + "properties": {}, + "required": [] + }, + "txid": { + "type": "number" + }, + "timestamp": { + "type": "string" } - } + }, + "required": [ + "postings", + "reference", + "metadata", + "txid", + "timestamp" + ] } - } + }, + "required": [ + "ledger", + "revertedTransaction", + "revertTransaction" + ] } }, "required": [ @@ -312,120 +262,27 @@ }, "payload": { "type": "object", - "required": [ - "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" - ], "properties": { - "id": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { + "ledger": { "type": "string" }, - "provider": { + "targetType": { "type": "string" }, - "description": { + "targetId": { "type": "string" }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } + "metadata": { + "type": "object", + "additionalProperties": {} } - } + }, + "required": [ + "ledger", + "targetType", + "targetId", + "metadata" + ] } }, "required": [ @@ -459,120 +316,73 @@ }, "payload": { "type": "object", - "required": [ - "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" - ], "properties": { - "id": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { + "ledger": { "type": "string" }, - "relatedPayments": { - "type": [ - "array", - "null" - ], + "transactions": { + "type": "array", "items": { "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" + "postings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "destination": { + "type": "string" + }, + "amount": { + "type": "number" + }, + "asset": { + "type": "string" + } + }, + "required": [ + "source", + "destination", + "amount", + "asset" + ] + } + }, + "reference": { + "type": "string" + }, + "metadata": { + "type": "object", + "properties": {}, + "required": [] + }, + "id": { + "type": "number" + }, + "timestamp": { + "type": "string" + }, + "reverted": { + "type": "boolean" } - } + }, + "required": [ + "postings", + "metadata", + "id", + "timestamp", + "reverted" + ] } } - } + }, + "required": [ + "ledger", + "transactions" + ] } }, "required": [ @@ -604,120 +414,173 @@ }, "payload": { "type": "object", - "required": [ - "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" - ], "properties": { - "id": { + "ledger": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { + "targetType": { "type": "string" }, - "provider": { + "targetId": { "type": "string" }, - "description": { + "key": { "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" + } + }, + "required": [ + "ledger", + "targetType", + "targetId", + "key" + ] + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] + }, + "REVERTED_TRANSACTION": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "ledger": { + "type": "string" + }, + "revertedTransaction": { + "type": "object", + "properties": { + "postings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "destination": { + "type": "string" + }, + "amount": { + "type": "number" + }, + "asset": { + "type": "string" + } + }, + "required": [ + "source", + "destination", + "amount", + "asset" + ] + } + }, + "reference": { + "type": "string" + }, + "metadata": { + "type": "object", + "properties": {}, + "required": [] + }, + "id": { + "type": "number" + }, + "timestamp": { + "type": "string" + }, + "reverted": { + "type": "boolean" + } + }, + "required": [ + "postings", + "metadata", + "id", + "timestamp", + "reverted" ] }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" + "revertTransaction": { + "type": "object", + "properties": { + "postings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "source": { + "type": "string" + }, + "destination": { + "type": "string" + }, + "amount": { + "type": "number" + }, + "asset": { + "type": "string" + } + }, + "required": [ + "source", + "destination", + "amount", + "asset" + ] } + }, + "reference": { + "type": "string" + }, + "metadata": { + "type": "object", + "properties": {}, + "required": [] + }, + "id": { + "type": "number" + }, + "timestamp": { + "type": "string" } - } + }, + "required": [ + "postings", + "metadata", + "id", + "timestamp" + ] } - } + }, + "required": [ + "ledger", + "revertedTransaction", + "revertTransaction" + ] } }, "required": [ @@ -728,7 +591,7 @@ "payload" ] }, - "REVERTED_TRANSACTION": { + "SAVED_METADATA": { "type": "object", "properties": { "app": { @@ -749,120 +612,81 @@ }, "payload": { "type": "object", - "required": [ - "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" - ], "properties": { - "id": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { + "ledger": { "type": "string" }, - "provider": { + "targetType": { "type": "string" }, - "description": { + "targetId": { "type": "string" }, - "type": { + "metadata": { + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "ledger", + "targetType", + "targetId", + "metadata" + ] + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] + } + } + }, + "orchestration": { + "v2.0.0": { + "FAILED_TRIGGER": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "id": { "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" + "minLength": 1 }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { + "triggerID": { "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] + "minLength": 1 }, "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } + "type": "string", + "minLength": 1 } - } + }, + "required": [ + "id", + "triggerID", + "error" + ] } }, "required": [ @@ -873,7 +697,7 @@ "payload" ] }, - "SAVED_METADATA": { + "FAILED_WORKFLOW": { "type": "object", "properties": { "app": { @@ -894,120 +718,25 @@ }, "payload": { "type": "object", - "required": [ - "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" - ], "properties": { "id": { - "type": "string" - }, - "createdAt": { "type": "string", - "format": "date-time" + "minLength": 1 }, - "scheduledAt": { + "instanceID": { "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { - "type": "string" + "minLength": 1 }, - "type": { + "error": { "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } + "minLength": 1 } - } + }, + "required": [ + "id", + "instanceID", + "error" + ] } }, "required": [ @@ -1017,12 +746,8 @@ "type", "payload" ] - } - } - }, - "orchestration": { - "v2.0.0": { - "FAILED_TRIGGER": { + }, + "FAILED_WORKFLOW_STAGE": { "type": "object", "properties": { "app": { @@ -1043,120 +768,30 @@ }, "payload": { "type": "object", - "required": [ - "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" - ], "properties": { "id": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { - "type": "string" + "minLength": 1 }, - "type": { + "instanceID": { "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" + "minLength": 1 }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] + "number": { + "type": "integer", + "minLength": 1 }, "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } + "type": "string", + "minLength": 1 } - } + }, + "required": [ + "id", + "instanceID", + "number", + "error" + ] } }, "required": [ @@ -1167,7 +802,7 @@ "payload" ] }, - "FAILED_WORKFLOW": { + "STARTED_WORKFLOW": { "type": "object", "properties": { "app": { @@ -1188,120 +823,70 @@ }, "payload": { "type": "object", - "required": [ - "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" - ], "properties": { "id": { - "type": "string" - }, - "createdAt": { "type": "string", - "format": "date-time" + "minLength": 1 }, - "scheduledAt": { + "instanceID": { "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { + "minLength": 1 + } + }, + "required": [ + "id", + "instanceID" + ] + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] + }, + "STARTED_WORKFLOW_STAGE": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "id": { "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] + "minLength": 1 }, - "sourceAccountId": { - "type": "string" + "instanceID": { + "type": "string", + "minLength": 1 }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } + "number": { + "type": "integer", + "minLength": 1 } - } + }, + "required": [ + "id", + "instanceID", + "number" + ] } }, "required": [ @@ -1312,7 +897,7 @@ "payload" ] }, - "FAILED_WORKFLOW_STAGE": { + "SUCCEEDED_TRIGGER": { "type": "object", "properties": { "app": { @@ -1333,120 +918,66 @@ }, "payload": { "type": "object", - "required": [ - "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" - ], "properties": { "id": { - "type": "string" - }, - "createdAt": { "type": "string", - "format": "date-time" + "minLength": 1 }, - "scheduledAt": { + "triggerID": { "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { + "minLength": 1 + } + }, + "required": [ + "id", + "triggerID", + "workflowInstanceID" + ] + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] + }, + "SUCCEEDED_WORKFLOW": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "properties": { + "id": { "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" + "minLength": 1 }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { + "instanceID": { "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } + "minLength": 1 } - } + }, + "required": [ + "id", + "instanceID" + ] } }, "required": [ @@ -1457,7 +988,7 @@ "payload" ] }, - "STARTED_WORKFLOW": { + "SUCCEEDED_WORKFLOW_STAGE": { "type": "object", "properties": { "app": { @@ -1478,265 +1009,25 @@ }, "payload": { "type": "object", - "required": [ - "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" - ], "properties": { "id": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" + "minLength": 1 }, - "description": { - "type": "string" - }, - "type": { + "instanceID": { "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] + "minLength": 1 }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } + "number": { + "type": "integer", + "minLength": 1 } - } - } - }, - "required": [ - "date", - "app", - "version", - "type", - "payload" - ] - }, - "STARTED_WORKFLOW_STAGE": { - "type": "object", - "properties": { - "app": { - "type": "string" - }, - "version": { - "type": "string" - }, - "date": { - "type": "string", - "format": "date-time" - }, - "type": { - "type": "string" - }, - "ledger": { - "type": "string" - }, - "payload": { - "type": "object", + }, "required": [ "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" - ], - "properties": { - "id": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } - } - } + "instanceID", + "number" + ] } }, "required": [ @@ -1746,8 +1037,12 @@ "type", "payload" ] - }, - "SUCCEEDED_TRIGGER": { + } + } + }, + "payments": { + "v0.0.0": { + "CONNECTOR_RESET": { "type": "object", "properties": { "app": { @@ -1768,120 +1063,18 @@ }, "payload": { "type": "object", - "required": [ - "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" - ], "properties": { - "id": { - "type": "string" - }, "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { "type": "string" }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { + "connector": { "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } } - } + }, + "required": [ + "createdAt", + "connector" + ] } }, "required": [ @@ -1892,7 +1085,7 @@ "payload" ] }, - "SUCCEEDED_WORKFLOW": { + "SAVED_ACCOUNT": { "type": "object", "properties": { "app": { @@ -1912,119 +1105,43 @@ "type": "string" }, "payload": { - "type": "object", - "required": [ - "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" - ], - "properties": { - "id": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } + "type": "object", + "required": [ + "id", + "reference", + "createdAt", + "provider", + "defaultAsset", + "accountName", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "reference": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "provider": { + "type": "string" + }, + "defaultAsset": { + "type": "string" + }, + "accountName": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "UNKNOWN", + "INTERNAL", + "EXTERNAL" + ] } } } @@ -2037,7 +1154,7 @@ "payload" ] }, - "SUCCEEDED_WORKFLOW_STAGE": { + "SAVED_BALANCE": { "type": "object", "properties": { "app": { @@ -2059,117 +1176,25 @@ "payload": { "type": "object", "required": [ - "id", + "accountID", "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", "asset", - "attempts", - "status", - "error" + "balance" ], "properties": { - "id": { + "accountID": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { + "asset": { "type": "string" }, - "amount": { + "balance": { "type": "number", "format": "bigint" - }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } } } } @@ -2181,12 +1206,8 @@ "type", "payload" ] - } - } - }, - "payments": { - "v0.0.0": { - "CONNECTOR_RESET": { + }, + "SAVED_PAYMENT": { "type": "object", "properties": { "app": { @@ -2209,116 +1230,158 @@ "type": "object", "required": [ "id", + "reference", "createdAt", - "scheduledAt", - "connectorId", "provider", - "description", "type", - "destinationAccountId", - "amount", - "asset", - "attempts", "status", - "error" + "scheme", + "asset", + "amount", + "initialAmount" ], "properties": { "id": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" + "reference": { + "type": "string" }, - "scheduledAt": { + "createdAt": { "type": "string", "format": "date-time" }, - "connectorId": { - "type": "string" - }, "provider": { "type": "string" }, - "description": { - "type": "string" - }, "type": { "type": "string", "enum": [ + "PAY-IN", + "PAYOUT", "TRANSFER", - "PAYOUT" + "OTHER" ] }, - "sourceAccountId": { + "status": { "type": "string" }, - "destinationAccountId": { + "scheme": { + "type": "string", + "enum": [ + "unknown", + "other", + "visa", + "mastercard", + "amex", + "diners", + "discover", + "jcb", + "unionpay", + "alipay", + "cup", + "sepa debit", + "sepa credit", + "sepa", + "apple pay", + "google pay", + "doku", + "dragonpay", + "maestro", + "molpay", + "a2a", + "ach debit", + "ach", + "rtp" + ] + }, + "asset": { "type": "string" }, "amount": { "type": "number", "format": "bigint" }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" + "initialAmount": { + "type": "number", + "format": "bigint" }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] + "sourceAccountId": { + "type": "string" }, - "error": { + "destinationAccountId": { "type": "string" }, - "relatedPayments": { + "links": { "type": [ "array", "null" ], "items": { "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { + "name": { "type": "string" }, - "error": { + "uri": { "type": "string" } } } + }, + "rawData": { + "type": "object" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] + } + }, + "v2.0.0": { + "CONNECTOR_RESET": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "createdAt", + "connectorID" + ], + "properties": { + "createdAt": { + "type": "string" + }, + "connectorID": { + "type": "string" } } } @@ -2331,7 +1394,7 @@ "payload" ] }, - "SAVED_ACCOUNT": { + "DELETED_POOL": { "type": "object", "properties": { "app": { @@ -2354,18 +1417,7 @@ "type": "object", "required": [ "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" + "createdAt" ], "properties": { "id": { @@ -2374,96 +1426,50 @@ "createdAt": { "type": "string", "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] + }, + "DELETED_TRANSFER_INITIATION": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "id", + "createdAt" + ], + "properties": { + "id": { "type": "string" }, - "attempts": { - "type": "number" - }, - "status": { + "createdAt": { "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } + "format": "date-time" } } } @@ -2476,7 +1482,7 @@ "payload" ] }, - "SAVED_BALANCE": { + "SAVED_ACCOUNT": { "type": "object", "properties": { "app": { @@ -2499,28 +1505,22 @@ "type": "object", "required": [ "id", + "reference", "createdAt", - "scheduledAt", "connectorId", "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" + "defaultAsset", + "accountName", + "type" ], "properties": { "id": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" + "reference": { + "type": "string" }, - "scheduledAt": { + "createdAt": { "type": "string", "format": "date-time" }, @@ -2530,85 +1530,19 @@ "provider": { "type": "string" }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { + "defaultAsset": { "type": "string" }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { + "accountName": { "type": "string" }, - "attempts": { - "type": "number" - }, - "status": { + "type": { "type": "string", "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" + "UNKNOWN", + "INTERNAL", + "EXTERNAL" ] - }, - "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } } } } @@ -2621,7 +1555,64 @@ "payload" ] }, - "SAVED_PAYMENT": { + "SAVED_BALANCE": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "accountID", + "connectorId", + "createdAt", + "asset", + "balance" + ], + "properties": { + "accountID": { + "type": "string" + }, + "connectorId": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "asset": { + "type": "string" + }, + "balance": { + "type": "number", + "format": "bigint" + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] + }, + "SAVED_BANK_ACCOUNT": { "type": "object", "properties": { "app": { @@ -2645,17 +1636,8 @@ "required": [ "id", "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" + "name", + "country" ], "properties": { "id": { @@ -2665,63 +1647,22 @@ "type": "string", "format": "date-time" }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { + "name": { "type": "string" }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { + "country": { "type": "string" }, - "destinationAccountId": { + "accountNumber": { "type": "string" }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { + "iban": { "type": "string" }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { + "swiftBicCode": { "type": "string" }, - "relatedPayments": { + "adjustments": { "type": [ "array", "null" @@ -2729,27 +1670,27 @@ "items": { "type": "object", "required": [ - "transferInitiationId", - "paymentId", + "id", "createdAt", - "status", - "error" + "accountID", + "connectorID", + "provider" ], "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { + "id": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, - "status": { + "accountID": { "type": "string" }, - "error": { + "connectorID": { + "type": "string" + }, + "provider": { "type": "string" } } @@ -2765,10 +1706,8 @@ "type", "payload" ] - } - }, - "v2.0.0": { - "CONNECTOR_RESET": { + }, + "SAVED_PAYMENT": { "type": "object", "properties": { "app": { @@ -2791,28 +1730,25 @@ "type": "object", "required": [ "id", + "reference", "createdAt", - "scheduledAt", "connectorId", "provider", - "description", "type", - "destinationAccountId", - "amount", - "asset", - "attempts", "status", - "error" + "scheme", + "asset", + "amount", + "initialAmount" ], "properties": { "id": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" + "reference": { + "type": "string" }, - "scheduledAt": { + "createdAt": { "type": "string", "format": "date-time" }, @@ -2822,85 +1758,89 @@ "provider": { "type": "string" }, - "description": { - "type": "string" - }, "type": { "type": "string", "enum": [ + "PAY-IN", + "PAYOUT", "TRANSFER", - "PAYOUT" + "OTHER" ] }, - "sourceAccountId": { + "status": { "type": "string" }, - "destinationAccountId": { + "scheme": { + "type": "string", + "enum": [ + "unknown", + "other", + "visa", + "mastercard", + "amex", + "diners", + "discover", + "jcb", + "unionpay", + "alipay", + "cup", + "sepa debit", + "sepa credit", + "sepa", + "apple pay", + "google pay", + "doku", + "dragonpay", + "maestro", + "molpay", + "a2a", + "ach debit", + "ach", + "rtp" + ] + }, + "asset": { "type": "string" }, "amount": { "type": "number", "format": "bigint" }, - "asset": { - "type": "string" - }, - "attempts": { - "type": "number" + "initialAmount": { + "type": "number", + "format": "bigint" }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] + "sourceAccountId": { + "type": "string" }, - "error": { + "destinationAccountId": { "type": "string" }, - "relatedPayments": { + "links": { "type": [ "array", "null" ], "items": { "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { + "name": { "type": "string" }, - "error": { + "uri": { "type": "string" } } } + }, + "rawData": { + "type": "object" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -2913,7 +1853,7 @@ "payload" ] }, - "DELETED_POOL": { + "SAVED_POOL": { "type": "object", "properties": { "app": { @@ -2936,115 +1876,25 @@ "type": "object", "required": [ "id", + "name", "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" + "accountIDs" ], "properties": { "id": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { + "name": { "type": "string" }, - "attempts": { - "type": "number" - }, - "status": { + "createdAt": { "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" + "format": "date-time" }, - "relatedPayments": { - "type": [ - "array", - "null" - ], + "accountIDs": { + "type": "array", "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } + "type": "string" } } } @@ -3058,7 +1908,7 @@ "payload" ] }, - "DELETED_TRANSFER_INITIATION": { + "SAVED_TRANSFER_INITIATION": { "type": "object", "properties": { "app": { @@ -3202,8 +2052,53 @@ "type", "payload" ] + } + }, + "v3.0.0": { + "CONNECTOR_RESET": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "createdAt", + "connectorID" + ], + "properties": { + "createdAt": { + "type": "string" + }, + "connectorID": { + "type": "string" + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] }, - "SAVED_ACCOUNT": { + "DELETED_POOL": { "type": "object", "properties": { "app": { @@ -3226,18 +2121,7 @@ "type": "object", "required": [ "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" + "createdAt" ], "properties": { "id": { @@ -3246,96 +2130,147 @@ "createdAt": { "type": "string", "format": "date-time" + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] + }, + "SAVED_ACCOUNT": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "id", + "provider", + "connectorID", + "createdAt", + "reference", + "type" + ], + "properties": { + "id": { + "type": "string" }, - "scheduledAt": { + "provider": { + "type": "string" + }, + "connectorID": { + "type": "string" + }, + "createdAt": { "type": "string", "format": "date-time" }, - "connectorId": { + "reference": { "type": "string" }, - "provider": { + "type": { "type": "string" }, - "description": { - "type": "string" + "rawData": { + "type": "object" }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] + "defaultAsset": { + "type": "string" }, - "sourceAccountId": { + "name": { "type": "string" }, - "destinationAccountId": { + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] + }, + "SAVED_BALANCE": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "accountID", + "connectorID", + "provider", + "createdAt", + "lastUpdatedAt", + "asset", + "balance" + ], + "properties": { + "accountID": { "type": "string" }, - "amount": { - "type": "number", - "format": "bigint" + "connectorID": { + "type": "string" }, - "asset": { + "provider": { "type": "string" }, - "attempts": { - "type": "number" + "createdAt": { + "type": "string", + "format": "date-time" }, - "status": { + "lastUpdatedAt": { "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] + "format": "date-time" }, - "error": { + "asset": { "type": "string" }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } + "balance": { + "type": "number", + "format": "bigint" } } } @@ -3348,7 +2283,7 @@ "payload" ] }, - "SAVED_BALANCE": { + "SAVED_BANK_ACCOUNT": { "type": "object", "properties": { "app": { @@ -3372,17 +2307,7 @@ "required": [ "id", "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" + "name" ], "properties": { "id": { @@ -3392,63 +2317,28 @@ "type": "string", "format": "date-time" }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { + "name": { "type": "string" }, - "description": { + "country": { "type": "string" }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { + "accountNumber": { "type": "string" }, - "destinationAccountId": { + "iban": { "type": "string" }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { + "swiftBicCode": { "type": "string" }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "relatedPayments": { + "relatedAccounts": { "type": [ "array", "null" @@ -3456,27 +2346,23 @@ "items": { "type": "object", "required": [ - "transferInitiationId", - "paymentId", "createdAt", - "status", - "error" + "accountID", + "connectorID", + "provider" ], "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, "createdAt": { "type": "string", "format": "date-time" }, - "status": { + "accountID": { "type": "string" }, - "error": { + "connectorID": { + "type": "string" + }, + "provider": { "type": "string" } } @@ -3493,7 +2379,7 @@ "payload" ] }, - "SAVED_BANK_ACCOUNT": { + "SAVED_PAYMENT": { "type": "object", "properties": { "app": { @@ -3516,116 +2402,85 @@ "type": "object", "required": [ "id", - "createdAt", - "scheduledAt", - "connectorId", + "connectorID", "provider", - "description", + "reference", + "createdAt", "type", - "destinationAccountId", - "amount", - "asset", - "attempts", "status", - "error" + "scheme", + "asset", + "amount", + "initialAmount" ], "properties": { "id": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { + "connectorID": { "type": "string" }, "provider": { "type": "string" }, - "description": { + "reference": { "type": "string" }, - "type": { + "createdAt": { "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] + "format": "date-time" }, - "sourceAccountId": { + "type": { "type": "string" }, - "destinationAccountId": { + "status": { "type": "string" }, - "amount": { - "type": "number", - "format": "bigint" + "scheme": { + "type": "string" }, "asset": { "type": "string" }, - "attempts": { - "type": "number" + "amount": { + "type": "number", + "format": "bigint" }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] + "initialAmount": { + "type": "number", + "format": "bigint" }, - "error": { + "sourceAccountID": { "type": "string" }, - "relatedPayments": { + "destinationAccountID": { + "type": "string" + }, + "links": { "type": [ "array", "null" ], "items": { "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { + "name": { "type": "string" }, - "error": { + "uri": { "type": "string" } } } + }, + "rawData": { + "type": "object" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } } } } @@ -3638,7 +2493,7 @@ "payload" ] }, - "SAVED_PAYMENT": { + "SAVED_PAYMENT_INITIATION": { "type": "object", "properties": { "app": { @@ -3661,115 +2516,60 @@ "type": "object", "required": [ "id", + "connectorID", + "provider", + "reference", "createdAt", "scheduledAt", - "connectorId", - "provider", "description", "type", - "destinationAccountId", "amount", - "asset", - "attempts", - "status", - "error" + "asset" ], "properties": { "id": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { + "connectorID": { "type": "string" }, "provider": { "type": "string" }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { - "type": "string" - }, - "destinationAccountId": { - "type": "string" - }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { + "reference": { "type": "string" }, - "attempts": { - "type": "number" - }, - "status": { + "createdAt": { "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" - }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } + "format": "date-time" + }, + "scheduledAt": { + "type": "string", + "format": "date-time" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + }, + "amount": { + "type": "number", + "format": "bigint" + }, + "asset": { + "type": "string" + }, + "sourceAccountID": { + "type": "string" + }, + "destinationAccountID": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" } } } @@ -3783,7 +2583,7 @@ "payload" ] }, - "SAVED_POOL": { + "SAVED_PAYMENT_INITIATION_ADJUSTMENT": { "type": "object", "properties": { "app": { @@ -3806,51 +2606,17 @@ "type": "object", "required": [ "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" + "paymentInitiationID", + "status" ], "properties": { "id": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { + "paymentInitiationID": { "type": "string" }, - "destinationAccountId": { + "status": { "type": "string" }, "amount": { @@ -3860,61 +2626,13 @@ "asset": { "type": "string" }, - "attempts": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, "error": { - "type": "string" + "type": "object" }, - "relatedPayments": { - "type": [ - "array", - "null" - ], - "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" } } } @@ -3928,7 +2646,7 @@ "payload" ] }, - "SAVED_TRANSFER_INITIATION": { + "SAVED_PAYMENT_INITIATION_RELATED_PAYMENT": { "type": "object", "properties": { "app": { @@ -3950,116 +2668,69 @@ "payload": { "type": "object", "required": [ - "id", - "createdAt", - "scheduledAt", - "connectorId", - "provider", - "description", - "type", - "destinationAccountId", - "amount", - "asset", - "attempts", - "status", - "error" + "paymentInitiationID", + "paymentID" ], "properties": { - "id": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "connectorId": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "description": { + "paymentInitiationID": { "type": "string" }, - "type": { - "type": "string", - "enum": [ - "TRANSFER", - "PAYOUT" - ] - }, - "sourceAccountId": { + "paymentID": { "type": "string" - }, - "destinationAccountId": { + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] + }, + "SAVED_POOL": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "id", + "name", + "createdAt", + "accountIDs" + ], + "properties": { + "id": { "type": "string" }, - "amount": { - "type": "number", - "format": "bigint" - }, - "asset": { + "name": { "type": "string" }, - "attempts": { - "type": "number" - }, - "status": { + "createdAt": { "type": "string", - "enum": [ - "WAITING_FOR_VALIDATION", - "PROCESSING", - "PROCESSED", - "FAILED", - "REJECTED", - "VALIDATED", - "ASK_RETRIED", - "ASK_REVERSED", - "REVERSE_PROCESSING", - "REVERSE_FAILED", - "PARTIALLY_REVERSED", - "REVERSED" - ] - }, - "error": { - "type": "string" + "format": "date-time" }, - "relatedPayments": { - "type": [ - "array", - "null" - ], + "accountIDs": { + "type": "array", "items": { - "type": "object", - "required": [ - "transferInitiationId", - "paymentId", - "createdAt", - "status", - "error" - ], - "properties": { - "transferInitiationId": { - "type": "string" - }, - "paymentId": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" - }, - "error": { - "type": "string" - } - } + "type": "string" } } } diff --git a/libs/events/generated/payments/v2.0.0/CONNECTOR_RESET.json b/libs/events/generated/payments/v2.0.0/CONNECTOR_RESET.json index 8fe73f28a4..33d9539e7c 100644 --- a/libs/events/generated/payments/v2.0.0/CONNECTOR_RESET.json +++ b/libs/events/generated/payments/v2.0.0/CONNECTOR_RESET.json @@ -19,18 +19,18 @@ }, "payload": { "type": "object", + "required": [ + "createdAt", + "connectorID" + ], "properties": { "createdAt": { "type": "string" }, - "connector": { + "connectorID": { "type": "string" } - }, - "required": [ - "createdAt", - "connectorId" - ] + } } }, "required": [ diff --git a/libs/events/generated/payments/v3.0.0/CONNECTOR_RESET.json b/libs/events/generated/payments/v3.0.0/CONNECTOR_RESET.json new file mode 100644 index 0000000000..33d9539e7c --- /dev/null +++ b/libs/events/generated/payments/v3.0.0/CONNECTOR_RESET.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "createdAt", + "connectorID" + ], + "properties": { + "createdAt": { + "type": "string" + }, + "connectorID": { + "type": "string" + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/payments/v3.0.0/DELETED_POOL.json b/libs/events/generated/payments/v3.0.0/DELETED_POOL.json new file mode 100644 index 0000000000..502d509ee4 --- /dev/null +++ b/libs/events/generated/payments/v3.0.0/DELETED_POOL.json @@ -0,0 +1,44 @@ +{ + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "id", + "createdAt" + ], + "properties": { + "id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/payments/v3.0.0/SAVED_ACCOUNT.json b/libs/events/generated/payments/v3.0.0/SAVED_ACCOUNT.json new file mode 100644 index 0000000000..5376f67359 --- /dev/null +++ b/libs/events/generated/payments/v3.0.0/SAVED_ACCOUNT.json @@ -0,0 +1,75 @@ +{ + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "id", + "provider", + "connectorID", + "createdAt", + "reference", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "connectorID": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "reference": { + "type": "string" + }, + "type": { + "type": "string" + }, + "rawData": { + "type": "object" + }, + "defaultAsset": { + "type": "string" + }, + "name": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/payments/v3.0.0/SAVED_BALANCE.json b/libs/events/generated/payments/v3.0.0/SAVED_BALANCE.json new file mode 100644 index 0000000000..584c3f449e --- /dev/null +++ b/libs/events/generated/payments/v3.0.0/SAVED_BALANCE.json @@ -0,0 +1,66 @@ +{ + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "accountID", + "connectorID", + "provider", + "createdAt", + "lastUpdatedAt", + "asset", + "balance" + ], + "properties": { + "accountID": { + "type": "string" + }, + "connectorID": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "lastUpdatedAt": { + "type": "string", + "format": "date-time" + }, + "asset": { + "type": "string" + }, + "balance": { + "type": "number", + "format": "bigint" + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/payments/v3.0.0/SAVED_BANK_ACCOUNT.json b/libs/events/generated/payments/v3.0.0/SAVED_BANK_ACCOUNT.json new file mode 100644 index 0000000000..d50de48d05 --- /dev/null +++ b/libs/events/generated/payments/v3.0.0/SAVED_BANK_ACCOUNT.json @@ -0,0 +1,96 @@ +{ + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "id", + "createdAt", + "name" + ], + "properties": { + "id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string" + }, + "country": { + "type": "string" + }, + "accountNumber": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "swiftBicCode": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "relatedAccounts": { + "type": [ + "array", + "null" + ], + "items": { + "type": "object", + "required": [ + "createdAt", + "accountID", + "connectorID", + "provider" + ], + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "accountID": { + "type": "string" + }, + "connectorID": { + "type": "string" + }, + "provider": { + "type": "string" + } + } + } + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/payments/v3.0.0/SAVED_PAYMENT.json b/libs/events/generated/payments/v3.0.0/SAVED_PAYMENT.json new file mode 100644 index 0000000000..18e5630f2f --- /dev/null +++ b/libs/events/generated/payments/v3.0.0/SAVED_PAYMENT.json @@ -0,0 +1,114 @@ +{ + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "id", + "connectorID", + "provider", + "reference", + "createdAt", + "type", + "status", + "scheme", + "asset", + "amount", + "initialAmount" + ], + "properties": { + "id": { + "type": "string" + }, + "connectorID": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "reference": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "status": { + "type": "string" + }, + "scheme": { + "type": "string" + }, + "asset": { + "type": "string" + }, + "amount": { + "type": "number", + "format": "bigint" + }, + "initialAmount": { + "type": "number", + "format": "bigint" + }, + "sourceAccountID": { + "type": "string" + }, + "destinationAccountID": { + "type": "string" + }, + "links": { + "type": [ + "array", + "null" + ], + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uri": { + "type": "string" + } + } + } + }, + "rawData": { + "type": "object" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/payments/v3.0.0/SAVED_PAYMENT_INITIATION.json b/libs/events/generated/payments/v3.0.0/SAVED_PAYMENT_INITIATION.json new file mode 100644 index 0000000000..f18c48b264 --- /dev/null +++ b/libs/events/generated/payments/v3.0.0/SAVED_PAYMENT_INITIATION.json @@ -0,0 +1,90 @@ +{ + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "id", + "connectorID", + "provider", + "reference", + "createdAt", + "scheduledAt", + "description", + "type", + "amount", + "asset" + ], + "properties": { + "id": { + "type": "string" + }, + "connectorID": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "reference": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "scheduledAt": { + "type": "string", + "format": "date-time" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + }, + "amount": { + "type": "number", + "format": "bigint" + }, + "asset": { + "type": "string" + }, + "sourceAccountID": { + "type": "string" + }, + "destinationAccountID": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/payments/v3.0.0/SAVED_PAYMENT_INITIATION_ADJUSTMENT.json b/libs/events/generated/payments/v3.0.0/SAVED_PAYMENT_INITIATION_ADJUSTMENT.json new file mode 100644 index 0000000000..9d2315939c --- /dev/null +++ b/libs/events/generated/payments/v3.0.0/SAVED_PAYMENT_INITIATION_ADJUSTMENT.json @@ -0,0 +1,63 @@ +{ + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "id", + "paymentInitiationID", + "status" + ], + "properties": { + "id": { + "type": "string" + }, + "paymentInitiationID": { + "type": "string" + }, + "status": { + "type": "string" + }, + "amount": { + "type": "number", + "format": "bigint" + }, + "asset": { + "type": "string" + }, + "error": { + "type": "object" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/payments/v3.0.0/SAVED_PAYMENT_INITIATION_RELATED_PAYMENT.json b/libs/events/generated/payments/v3.0.0/SAVED_PAYMENT_INITIATION_RELATED_PAYMENT.json new file mode 100644 index 0000000000..03a52e9651 --- /dev/null +++ b/libs/events/generated/payments/v3.0.0/SAVED_PAYMENT_INITIATION_RELATED_PAYMENT.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "paymentInitiationID", + "paymentID" + ], + "properties": { + "paymentInitiationID": { + "type": "string" + }, + "paymentID": { + "type": "string" + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/payments/v3.0.0/SAVED_POOL.json b/libs/events/generated/payments/v3.0.0/SAVED_POOL.json new file mode 100644 index 0000000000..ed5ac463f9 --- /dev/null +++ b/libs/events/generated/payments/v3.0.0/SAVED_POOL.json @@ -0,0 +1,55 @@ +{ + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "version": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "ledger": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "id", + "name", + "createdAt", + "accountIDs" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "accountIDs": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/index.js b/libs/events/index.js index 078d0d7ec9..efb4a88f72 100644 --- a/libs/events/index.js +++ b/libs/events/index.js @@ -4,7 +4,6 @@ const yaml = require('yaml'); (async () => { const rawBase = await fs.readFile("./base.yaml", { encoding: 'utf8' }); - const base = yaml.parse(rawBase); const aggregated = {}; for(const service of await fs.readdir("services")) { @@ -13,6 +12,7 @@ const yaml = require('yaml'); aggregated[service][version] = {}; for(const event of await fs.readdir('services/' + service + '/' + version)) { const rawEventData = await fs.readFile('services/' + service + '/' + version + '/' + event, { encoding: 'utf8' }); + const base = yaml.parse(rawBase); base.properties.payload = yaml.parse(rawEventData); const directory = 'generated/' + service + '/' + version + '/'; await fs.mkdir(directory, { recursive: true }); @@ -23,5 +23,6 @@ const yaml = require('yaml'); } } + console.log(aggregated); await fs.writeFile('generated/all.json', JSON.stringify(aggregated, null, 2)); })(); \ No newline at end of file diff --git a/libs/events/services/payments/v2.0.0/CONNECTOR_RESET.yaml b/libs/events/services/payments/v2.0.0/CONNECTOR_RESET.yaml index 6b371499e5..8cdefc2c1c 100644 --- a/libs/events/services/payments/v2.0.0/CONNECTOR_RESET.yaml +++ b/libs/events/services/payments/v2.0.0/CONNECTOR_RESET.yaml @@ -1,9 +1,9 @@ type: object +required: + - createdAt + - connectorID properties: createdAt: type: string - connector: - type: string -required: -- createdAt -- connectorId + connectorID: + type: string \ No newline at end of file diff --git a/libs/events/services/payments/v3.0.0/CONNECTOR_RESET.yaml b/libs/events/services/payments/v3.0.0/CONNECTOR_RESET.yaml new file mode 100644 index 0000000000..8cdefc2c1c --- /dev/null +++ b/libs/events/services/payments/v3.0.0/CONNECTOR_RESET.yaml @@ -0,0 +1,9 @@ +type: object +required: + - createdAt + - connectorID +properties: + createdAt: + type: string + connectorID: + type: string \ No newline at end of file diff --git a/libs/events/services/payments/v3.0.0/DELETED_POOL.yaml b/libs/events/services/payments/v3.0.0/DELETED_POOL.yaml new file mode 100644 index 0000000000..430d4df16c --- /dev/null +++ b/libs/events/services/payments/v3.0.0/DELETED_POOL.yaml @@ -0,0 +1,10 @@ +type: object +required: + - id + - createdAt +properties: + id: + type: string + createdAt: + type: string + format: date-time \ No newline at end of file diff --git a/libs/events/services/payments/v3.0.0/SAVED_ACCOUNT.yaml b/libs/events/services/payments/v3.0.0/SAVED_ACCOUNT.yaml new file mode 100644 index 0000000000..f13318f09d --- /dev/null +++ b/libs/events/services/payments/v3.0.0/SAVED_ACCOUNT.yaml @@ -0,0 +1,32 @@ +type: object +required: + - id + - provider + - connectorID + - createdAt + - reference + - type +properties: + id: + type: string + provider: + type: string + connectorID: + type: string + createdAt: + type: string + format: date-time + reference: + type: string + type: + type: string + rawData: + type: object + defaultAsset: + type: string + name: + type: string + metadata: + type: object + additionalProperties: + type: string \ No newline at end of file diff --git a/libs/events/services/payments/v3.0.0/SAVED_BALANCE.yaml b/libs/events/services/payments/v3.0.0/SAVED_BALANCE.yaml new file mode 100644 index 0000000000..ac15651e50 --- /dev/null +++ b/libs/events/services/payments/v3.0.0/SAVED_BALANCE.yaml @@ -0,0 +1,27 @@ +type: object +required: + - accountID + - connectorID + - provider + - createdAt + - lastUpdatedAt + - asset + - balance +properties: + accountID: + type: string + connectorID: + type: string + provider: + type: string + createdAt: + type: string + format: date-time + lastUpdatedAt: + type: string + format: date-time + asset: + type: string + balance: + type: number + format: bigint \ No newline at end of file diff --git a/libs/events/services/payments/v3.0.0/SAVED_BANK_ACCOUNT.yaml b/libs/events/services/payments/v3.0.0/SAVED_BANK_ACCOUNT.yaml new file mode 100644 index 0000000000..21ae48b524 --- /dev/null +++ b/libs/events/services/payments/v3.0.0/SAVED_BANK_ACCOUNT.yaml @@ -0,0 +1,44 @@ +type: object +required: + - id + - createdAt + - name +properties: + id: + type: string + createdAt: + type: string + format: date-time + name: + type: string + country: + type: string + accountNumber: + type: string + iban: + type: string + swiftBicCode: + type: string + metadata: + type: object + additionalProperties: + type: string + relatedAccounts: + type: ["array", "null"] + items: + type: object + required: + - createdAt + - accountID + - connectorID + - provider + properties: + createdAt: + type: string + format: date-time + accountID: + type: string + connectorID: + type: string + provider: + type: string \ No newline at end of file diff --git a/libs/events/services/payments/v3.0.0/SAVED_PAYMENT.yaml b/libs/events/services/payments/v3.0.0/SAVED_PAYMENT.yaml new file mode 100644 index 0000000000..ed15721e0a --- /dev/null +++ b/libs/events/services/payments/v3.0.0/SAVED_PAYMENT.yaml @@ -0,0 +1,58 @@ +type: object +required: + - id + - connectorID + - provider + - reference + - createdAt + - type + - status + - scheme + - asset + - amount + - initialAmount +properties: + id: + type: string + connectorID: + type: string + provider: + type: string + reference: + type: string + createdAt: + type: string + format: date-time + type: + type: string + status: + type: string + scheme: + type: string + asset: + type: string + amount: + type: number + format: bigint + initialAmount: + type: number + format: bigint + sourceAccountID: + type: string + destinationAccountID: + type: string + links: + type: ["array", "null"] + items: + type: object + properties: + name: + type: string + uri: + type: string + rawData: + type: object + metadata: + type: object + additionalProperties: + type: string diff --git a/libs/events/services/payments/v3.0.0/SAVED_PAYMENT_INITIATION.yaml b/libs/events/services/payments/v3.0.0/SAVED_PAYMENT_INITIATION.yaml new file mode 100644 index 0000000000..81779e3711 --- /dev/null +++ b/libs/events/services/payments/v3.0.0/SAVED_PAYMENT_INITIATION.yaml @@ -0,0 +1,44 @@ +type: object +required: + - id + - connectorID + - provider + - reference + - createdAt + - scheduledAt + - description + - type + - amount + - asset +properties: + id: + type: string + connectorID: + type: string + provider: + type: string + reference: + type: string + createdAt: + type: string + format: date-time + scheduledAt: + type: string + format: date-time + description: + type: string + type: + type: string + amount: + type: number + format: bigint + asset: + type: string + sourceAccountID: + type: string + destinationAccountID: + type: string + metadata: + type: object + additionalProperties: + type: string \ No newline at end of file diff --git a/libs/events/services/payments/v3.0.0/SAVED_PAYMENT_INITIATION_ADJUSTMENT.yaml b/libs/events/services/payments/v3.0.0/SAVED_PAYMENT_INITIATION_ADJUSTMENT.yaml new file mode 100644 index 0000000000..b81f7ccca0 --- /dev/null +++ b/libs/events/services/payments/v3.0.0/SAVED_PAYMENT_INITIATION_ADJUSTMENT.yaml @@ -0,0 +1,23 @@ +type: object +required: + - id + - paymentInitiationID + - status +properties: + id: + type: string + paymentInitiationID: + type: string + status: + type: string + amount: + type: number + format: bigint + asset: + type: string + error: + type: object + metadata: + type: object + additionalProperties: + type: string \ No newline at end of file diff --git a/libs/events/services/payments/v3.0.0/SAVED_PAYMENT_INITIATION_RELATED_PAYMENT.yaml b/libs/events/services/payments/v3.0.0/SAVED_PAYMENT_INITIATION_RELATED_PAYMENT.yaml new file mode 100644 index 0000000000..afbe7a8ac9 --- /dev/null +++ b/libs/events/services/payments/v3.0.0/SAVED_PAYMENT_INITIATION_RELATED_PAYMENT.yaml @@ -0,0 +1,9 @@ +type: object +required: + - paymentInitiationID + - paymentID +properties: + paymentInitiationID: + type: string + paymentID: + type: string \ No newline at end of file diff --git a/libs/events/services/payments/v3.0.0/SAVED_POOL.yaml b/libs/events/services/payments/v3.0.0/SAVED_POOL.yaml new file mode 100644 index 0000000000..e9086da799 --- /dev/null +++ b/libs/events/services/payments/v3.0.0/SAVED_POOL.yaml @@ -0,0 +1,18 @@ +type: object +required: + - id + - name + - createdAt + - accountIDs +properties: + id: + type: string + name: + type: string + createdAt: + type: string + format: date-time + accountIDs: + type: array + items: + type: string \ No newline at end of file