From f51da7acb0f0458918f863f6f88d3526b29b95d5 Mon Sep 17 00:00:00 2001 From: Ragot Geoffrey Date: Wed, 28 Feb 2024 14:04:52 +0100 Subject: [PATCH] chore: refine events directory structure (#1291) --- ...er-v1.0.0-COMMITTED_TRANSACTIONS.yaml.json | 1 - ...dger-v1.0.0-REVERTED_TRANSACTION.yaml.json | 1 - .../ledger-v1.0.0-SAVED_METADATA.yaml.json | 1 - ...er-v2.0.0-COMMITTED_TRANSACTIONS.yaml.json | 1 - .../ledger-v2.0.0-DELETED_METADATA.yaml.json | 1 - ...dger-v2.0.0-REVERTED_TRANSACTION.yaml.json | 1 - .../ledger-v2.0.0-SAVED_METADATA.yaml.json | 1 - .../ledger/v1.0.0/COMMITTED_TRANSACTIONS.json | 95 +++++++++++ .../ledger/v1.0.0/REVERTED_TRANSACTION.json | 145 +++++++++++++++++ .../ledger/v1.0.0/SAVED_METADATA.json | 52 +++++++ .../ledger/v2.0.0/COMMITTED_TRANSACTIONS.json | 98 ++++++++++++ .../ledger/v2.0.0/DELETED_METADATA.json | 51 ++++++ .../ledger/v2.0.0/REVERTED_TRANSACTION.json | 147 ++++++++++++++++++ .../ledger/v2.0.0/SAVED_METADATA.json | 52 +++++++ .../orchestration/v2.0.0/FAILED_TRIGGER.json | 47 ++++++ .../orchestration/v2.0.0/FAILED_WORKFLOW.json | 47 ++++++ .../v2.0.0/SUCCEEDED_TRIGGER.json | 43 +++++ .../v2.0.0/SUCCEEDED_WORKFLOW.json | 43 +++++ .../payments-v1.0.0-CONNECTOR_RESET.yaml.json | 1 - .../payments-v1.0.0-DELETED_POOL.yaml.json | 1 - ....0.0-DELETED_TRANSFER_INITIATION.yaml.json | 1 - .../payments-v1.0.0-SAVED_ACCOUNT.yaml.json | 1 - .../payments-v1.0.0-SAVED_BALANCE.yaml.json | 1 - ...yments-v1.0.0-SAVED_BANK_ACCOUNT.yaml.json | 1 - .../payments-v1.0.0-SAVED_PAYMENT.yaml.json | 1 - .../payments-v1.0.0-SAVED_POOL.yaml.json | 1 - ...v1.0.0-SAVED_TRANSFER_INITIATION.yaml.json | 1 - .../payments/v1.0.0/CONNECTOR_RESET.json | 43 +++++ .../payments/v1.0.0/DELETED_POOL.json | 44 ++++++ .../v1.0.0/DELETED_TRANSFER_INITIATION.json | 44 ++++++ .../payments/v1.0.0/SAVED_ACCOUNT.json | 73 +++++++++ .../payments/v1.0.0/SAVED_BALANCE.json | 57 +++++++ .../payments/v1.0.0/SAVED_BANK_ACCOUNT.json | 95 +++++++++++ .../payments/v1.0.0/SAVED_PAYMENT.json | 146 +++++++++++++++++ .../generated/payments/v1.0.0/SAVED_POOL.json | 55 +++++++ .../v1.0.0/SAVED_TRANSFER_INITIATION.json | 145 +++++++++++++++++ libs/events/index.js | 4 +- libs/go-libs/publish/module.go | 3 +- 38 files changed, 1527 insertions(+), 18 deletions(-) delete mode 100644 libs/events/generated/ledger-v1.0.0-COMMITTED_TRANSACTIONS.yaml.json delete mode 100644 libs/events/generated/ledger-v1.0.0-REVERTED_TRANSACTION.yaml.json delete mode 100644 libs/events/generated/ledger-v1.0.0-SAVED_METADATA.yaml.json delete mode 100644 libs/events/generated/ledger-v2.0.0-COMMITTED_TRANSACTIONS.yaml.json delete mode 100644 libs/events/generated/ledger-v2.0.0-DELETED_METADATA.yaml.json delete mode 100644 libs/events/generated/ledger-v2.0.0-REVERTED_TRANSACTION.yaml.json delete mode 100644 libs/events/generated/ledger-v2.0.0-SAVED_METADATA.yaml.json create mode 100644 libs/events/generated/ledger/v1.0.0/COMMITTED_TRANSACTIONS.json create mode 100644 libs/events/generated/ledger/v1.0.0/REVERTED_TRANSACTION.json create mode 100644 libs/events/generated/ledger/v1.0.0/SAVED_METADATA.json create mode 100644 libs/events/generated/ledger/v2.0.0/COMMITTED_TRANSACTIONS.json create mode 100644 libs/events/generated/ledger/v2.0.0/DELETED_METADATA.json create mode 100644 libs/events/generated/ledger/v2.0.0/REVERTED_TRANSACTION.json create mode 100644 libs/events/generated/ledger/v2.0.0/SAVED_METADATA.json create mode 100644 libs/events/generated/orchestration/v2.0.0/FAILED_TRIGGER.json create mode 100644 libs/events/generated/orchestration/v2.0.0/FAILED_WORKFLOW.json create mode 100644 libs/events/generated/orchestration/v2.0.0/SUCCEEDED_TRIGGER.json create mode 100644 libs/events/generated/orchestration/v2.0.0/SUCCEEDED_WORKFLOW.json delete mode 100644 libs/events/generated/payments-v1.0.0-CONNECTOR_RESET.yaml.json delete mode 100644 libs/events/generated/payments-v1.0.0-DELETED_POOL.yaml.json delete mode 100644 libs/events/generated/payments-v1.0.0-DELETED_TRANSFER_INITIATION.yaml.json delete mode 100644 libs/events/generated/payments-v1.0.0-SAVED_ACCOUNT.yaml.json delete mode 100644 libs/events/generated/payments-v1.0.0-SAVED_BALANCE.yaml.json delete mode 100644 libs/events/generated/payments-v1.0.0-SAVED_BANK_ACCOUNT.yaml.json delete mode 100644 libs/events/generated/payments-v1.0.0-SAVED_PAYMENT.yaml.json delete mode 100644 libs/events/generated/payments-v1.0.0-SAVED_POOL.yaml.json delete mode 100644 libs/events/generated/payments-v1.0.0-SAVED_TRANSFER_INITIATION.yaml.json create mode 100644 libs/events/generated/payments/v1.0.0/CONNECTOR_RESET.json create mode 100644 libs/events/generated/payments/v1.0.0/DELETED_POOL.json create mode 100644 libs/events/generated/payments/v1.0.0/DELETED_TRANSFER_INITIATION.json create mode 100644 libs/events/generated/payments/v1.0.0/SAVED_ACCOUNT.json create mode 100644 libs/events/generated/payments/v1.0.0/SAVED_BALANCE.json create mode 100644 libs/events/generated/payments/v1.0.0/SAVED_BANK_ACCOUNT.json create mode 100644 libs/events/generated/payments/v1.0.0/SAVED_PAYMENT.json create mode 100644 libs/events/generated/payments/v1.0.0/SAVED_POOL.json create mode 100644 libs/events/generated/payments/v1.0.0/SAVED_TRANSFER_INITIATION.json diff --git a/libs/events/generated/ledger-v1.0.0-COMMITTED_TRANSACTIONS.yaml.json b/libs/events/generated/ledger-v1.0.0-COMMITTED_TRANSACTIONS.yaml.json deleted file mode 100644 index b3d9758279..0000000000 --- a/libs/events/generated/ledger-v1.0.0-COMMITTED_TRANSACTIONS.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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"},"transactions":{"type":"array","items":{"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","transactions"]}},"required":["date","app","version","type","payload"]} \ No newline at end of file diff --git a/libs/events/generated/ledger-v1.0.0-REVERTED_TRANSACTION.yaml.json b/libs/events/generated/ledger-v1.0.0-REVERTED_TRANSACTION.yaml.json deleted file mode 100644 index 6ee7be5e73..0000000000 --- a/libs/events/generated/ledger-v1.0.0-REVERTED_TRANSACTION.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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":[]},"txid":{"type":"number"},"timestamp":{"type":"string"}},"required":["postings","reference","metadata","txid","timestamp"]},"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":["date","app","version","type","payload"]} \ No newline at end of file diff --git a/libs/events/generated/ledger-v1.0.0-SAVED_METADATA.yaml.json b/libs/events/generated/ledger-v1.0.0-SAVED_METADATA.yaml.json deleted file mode 100644 index 1fa2012b35..0000000000 --- a/libs/events/generated/ledger-v1.0.0-SAVED_METADATA.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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"},"targetType":{"type":"string"},"targetId":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}}},"required":["ledger","targetType","targetId","metadata"]}},"required":["date","app","version","type","payload"]} \ No newline at end of file diff --git a/libs/events/generated/ledger-v2.0.0-COMMITTED_TRANSACTIONS.yaml.json b/libs/events/generated/ledger-v2.0.0-COMMITTED_TRANSACTIONS.yaml.json deleted file mode 100644 index 142b775bd8..0000000000 --- a/libs/events/generated/ledger-v2.0.0-COMMITTED_TRANSACTIONS.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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"},"transactions":{"type":"array","items":{"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"]}}},"required":["ledger","transactions"]}},"required":["date","app","version","type","payload"]} \ No newline at end of file diff --git a/libs/events/generated/ledger-v2.0.0-DELETED_METADATA.yaml.json b/libs/events/generated/ledger-v2.0.0-DELETED_METADATA.yaml.json deleted file mode 100644 index 2d8feb330e..0000000000 --- a/libs/events/generated/ledger-v2.0.0-DELETED_METADATA.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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"},"targetType":{"type":"string"},"targetId":{"type":"string"},"key":{"type":"string"}},"required":["ledger","targetType","targetId","key"]}},"required":["date","app","version","type","payload"]} \ No newline at end of file diff --git a/libs/events/generated/ledger-v2.0.0-REVERTED_TRANSACTION.yaml.json b/libs/events/generated/ledger-v2.0.0-REVERTED_TRANSACTION.yaml.json deleted file mode 100644 index 3741d89705..0000000000 --- a/libs/events/generated/ledger-v2.0.0-REVERTED_TRANSACTION.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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"]},"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":["date","app","version","type","payload"]} \ No newline at end of file diff --git a/libs/events/generated/ledger-v2.0.0-SAVED_METADATA.yaml.json b/libs/events/generated/ledger-v2.0.0-SAVED_METADATA.yaml.json deleted file mode 100644 index 1fa2012b35..0000000000 --- a/libs/events/generated/ledger-v2.0.0-SAVED_METADATA.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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"},"targetType":{"type":"string"},"targetId":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}}},"required":["ledger","targetType","targetId","metadata"]}},"required":["date","app","version","type","payload"]} \ No newline at end of file diff --git a/libs/events/generated/ledger/v1.0.0/COMMITTED_TRANSACTIONS.json b/libs/events/generated/ledger/v1.0.0/COMMITTED_TRANSACTIONS.json new file mode 100644 index 0000000000..cfde84c2b0 --- /dev/null +++ b/libs/events/generated/ledger/v1.0.0/COMMITTED_TRANSACTIONS.json @@ -0,0 +1,95 @@ +{ + "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" + }, + "transactions": { + "type": "array", + "items": { + "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", + "transactions" + ] + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/ledger/v1.0.0/REVERTED_TRANSACTION.json b/libs/events/generated/ledger/v1.0.0/REVERTED_TRANSACTION.json new file mode 100644 index 0000000000..32feadcf18 --- /dev/null +++ b/libs/events/generated/ledger/v1.0.0/REVERTED_TRANSACTION.json @@ -0,0 +1,145 @@ +{ + "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": [] + }, + "txid": { + "type": "number" + }, + "timestamp": { + "type": "string" + } + }, + "required": [ + "postings", + "reference", + "metadata", + "txid", + "timestamp" + ] + }, + "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": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/ledger/v1.0.0/SAVED_METADATA.json b/libs/events/generated/ledger/v1.0.0/SAVED_METADATA.json new file mode 100644 index 0000000000..c9f49b9cb9 --- /dev/null +++ b/libs/events/generated/ledger/v1.0.0/SAVED_METADATA.json @@ -0,0 +1,52 @@ +{ + "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" + }, + "targetType": { + "type": "string" + }, + "targetId": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "ledger", + "targetType", + "targetId", + "metadata" + ] + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/ledger/v2.0.0/COMMITTED_TRANSACTIONS.json b/libs/events/generated/ledger/v2.0.0/COMMITTED_TRANSACTIONS.json new file mode 100644 index 0000000000..ebe9f1cfa4 --- /dev/null +++ b/libs/events/generated/ledger/v2.0.0/COMMITTED_TRANSACTIONS.json @@ -0,0 +1,98 @@ +{ + "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" + }, + "transactions": { + "type": "array", + "items": { + "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" + ] + } + } + }, + "required": [ + "ledger", + "transactions" + ] + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/ledger/v2.0.0/DELETED_METADATA.json b/libs/events/generated/ledger/v2.0.0/DELETED_METADATA.json new file mode 100644 index 0000000000..993fdd9c3d --- /dev/null +++ b/libs/events/generated/ledger/v2.0.0/DELETED_METADATA.json @@ -0,0 +1,51 @@ +{ + "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" + }, + "targetType": { + "type": "string" + }, + "targetId": { + "type": "string" + }, + "key": { + "type": "string" + } + }, + "required": [ + "ledger", + "targetType", + "targetId", + "key" + ] + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/ledger/v2.0.0/REVERTED_TRANSACTION.json b/libs/events/generated/ledger/v2.0.0/REVERTED_TRANSACTION.json new file mode 100644 index 0000000000..df1e5038fc --- /dev/null +++ b/libs/events/generated/ledger/v2.0.0/REVERTED_TRANSACTION.json @@ -0,0 +1,147 @@ +{ + "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" + ] + }, + "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": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/ledger/v2.0.0/SAVED_METADATA.json b/libs/events/generated/ledger/v2.0.0/SAVED_METADATA.json new file mode 100644 index 0000000000..c9f49b9cb9 --- /dev/null +++ b/libs/events/generated/ledger/v2.0.0/SAVED_METADATA.json @@ -0,0 +1,52 @@ +{ + "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" + }, + "targetType": { + "type": "string" + }, + "targetId": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "ledger", + "targetType", + "targetId", + "metadata" + ] + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/orchestration/v2.0.0/FAILED_TRIGGER.json b/libs/events/generated/orchestration/v2.0.0/FAILED_TRIGGER.json new file mode 100644 index 0000000000..6bf407bb61 --- /dev/null +++ b/libs/events/generated/orchestration/v2.0.0/FAILED_TRIGGER.json @@ -0,0 +1,47 @@ +{ + "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" + }, + "eventID": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "required": [ + "id", + "eventID", + "error" + ] + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/orchestration/v2.0.0/FAILED_WORKFLOW.json b/libs/events/generated/orchestration/v2.0.0/FAILED_WORKFLOW.json new file mode 100644 index 0000000000..c3e348150c --- /dev/null +++ b/libs/events/generated/orchestration/v2.0.0/FAILED_WORKFLOW.json @@ -0,0 +1,47 @@ +{ + "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" + }, + "instanceID": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "required": [ + "id", + "instanceID", + "error" + ] + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/orchestration/v2.0.0/SUCCEEDED_TRIGGER.json b/libs/events/generated/orchestration/v2.0.0/SUCCEEDED_TRIGGER.json new file mode 100644 index 0000000000..70803bd4d0 --- /dev/null +++ b/libs/events/generated/orchestration/v2.0.0/SUCCEEDED_TRIGGER.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", + "properties": { + "id": { + "type": "string" + }, + "eventID": { + "type": "string" + } + }, + "required": [ + "id", + "eventID" + ] + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/orchestration/v2.0.0/SUCCEEDED_WORKFLOW.json b/libs/events/generated/orchestration/v2.0.0/SUCCEEDED_WORKFLOW.json new file mode 100644 index 0000000000..ae695310d9 --- /dev/null +++ b/libs/events/generated/orchestration/v2.0.0/SUCCEEDED_WORKFLOW.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", + "properties": { + "id": { + "type": "string" + }, + "instanceID": { + "type": "string" + } + }, + "required": [ + "id", + "instanceID" + ] + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/payments-v1.0.0-CONNECTOR_RESET.yaml.json b/libs/events/generated/payments-v1.0.0-CONNECTOR_RESET.yaml.json deleted file mode 100644 index dfeef51ec1..0000000000 --- a/libs/events/generated/payments-v1.0.0-CONNECTOR_RESET.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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":{"createdAt":{"type":"string"},"connector":{"type":"string"}},"required":["createdAt","connectorId"]}},"required":["date","app","version","type","payload"]} \ No newline at end of file diff --git a/libs/events/generated/payments-v1.0.0-DELETED_POOL.yaml.json b/libs/events/generated/payments-v1.0.0-DELETED_POOL.yaml.json deleted file mode 100644 index 1ce33750a7..0000000000 --- a/libs/events/generated/payments-v1.0.0-DELETED_POOL.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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-v1.0.0-DELETED_TRANSFER_INITIATION.yaml.json b/libs/events/generated/payments-v1.0.0-DELETED_TRANSFER_INITIATION.yaml.json deleted file mode 100644 index 1ce33750a7..0000000000 --- a/libs/events/generated/payments-v1.0.0-DELETED_TRANSFER_INITIATION.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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-v1.0.0-SAVED_ACCOUNT.yaml.json b/libs/events/generated/payments-v1.0.0-SAVED_ACCOUNT.yaml.json deleted file mode 100644 index 3b11a8f4e1..0000000000 --- a/libs/events/generated/payments-v1.0.0-SAVED_ACCOUNT.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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","reference","createdAt","connectorId","provider","defaultAsset","accountName","type"],"properties":{"id":{"type":"string"},"reference":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"connectorId":{"type":"string"},"provider":{"type":"string"},"defaultAsset":{"type":"string"},"accountName":{"type":"string"},"type":{"type":"string","enum":["UNKNOWN","INTERNAL","EXTERNAL"]}}}},"required":["date","app","version","type","payload"]} \ No newline at end of file diff --git a/libs/events/generated/payments-v1.0.0-SAVED_BALANCE.yaml.json b/libs/events/generated/payments-v1.0.0-SAVED_BALANCE.yaml.json deleted file mode 100644 index 6350d7a16e..0000000000 --- a/libs/events/generated/payments-v1.0.0-SAVED_BALANCE.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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"]} \ No newline at end of file diff --git a/libs/events/generated/payments-v1.0.0-SAVED_BANK_ACCOUNT.yaml.json b/libs/events/generated/payments-v1.0.0-SAVED_BANK_ACCOUNT.yaml.json deleted file mode 100644 index 58cc015c34..0000000000 --- a/libs/events/generated/payments-v1.0.0-SAVED_BANK_ACCOUNT.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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","country"],"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"},"adjustments":{"type":["array","null"],"items":{"type":"object","required":["id","createdAt","accountID","connectorID","provider"],"properties":{"id":{"type":"string"},"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-v1.0.0-SAVED_PAYMENT.yaml.json b/libs/events/generated/payments-v1.0.0-SAVED_PAYMENT.yaml.json deleted file mode 100644 index 8fc954bca5..0000000000 --- a/libs/events/generated/payments-v1.0.0-SAVED_PAYMENT.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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","reference","createdAt","connectorId","provider","type","status","scheme","asset","amount","initialAmount"],"properties":{"id":{"type":"string"},"reference":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"connectorId":{"type":"string"},"provider":{"type":"string"},"type":{"type":"string","enum":["PAY-IN","PAYOUT","TRANSFER","OTHER"]},"status":{"type":"string"},"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"},"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-v1.0.0-SAVED_POOL.yaml.json b/libs/events/generated/payments-v1.0.0-SAVED_POOL.yaml.json deleted file mode 100644 index cc3dac4d4f..0000000000 --- a/libs/events/generated/payments-v1.0.0-SAVED_POOL.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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/generated/payments-v1.0.0-SAVED_TRANSFER_INITIATION.yaml.json b/libs/events/generated/payments-v1.0.0-SAVED_TRANSFER_INITIATION.yaml.json deleted file mode 100644 index 26ac592bff..0000000000 --- a/libs/events/generated/payments-v1.0.0-SAVED_TRANSFER_INITIATION.yaml.json +++ /dev/null @@ -1 +0,0 @@ -{"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"}}}}}}},"required":["date","app","version","type","payload"]} \ No newline at end of file diff --git a/libs/events/generated/payments/v1.0.0/CONNECTOR_RESET.json b/libs/events/generated/payments/v1.0.0/CONNECTOR_RESET.json new file mode 100644 index 0000000000..8fe73f28a4 --- /dev/null +++ b/libs/events/generated/payments/v1.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", + "properties": { + "createdAt": { + "type": "string" + }, + "connector": { + "type": "string" + } + }, + "required": [ + "createdAt", + "connectorId" + ] + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/payments/v1.0.0/DELETED_POOL.json b/libs/events/generated/payments/v1.0.0/DELETED_POOL.json new file mode 100644 index 0000000000..502d509ee4 --- /dev/null +++ b/libs/events/generated/payments/v1.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/v1.0.0/DELETED_TRANSFER_INITIATION.json b/libs/events/generated/payments/v1.0.0/DELETED_TRANSFER_INITIATION.json new file mode 100644 index 0000000000..502d509ee4 --- /dev/null +++ b/libs/events/generated/payments/v1.0.0/DELETED_TRANSFER_INITIATION.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/v1.0.0/SAVED_ACCOUNT.json b/libs/events/generated/payments/v1.0.0/SAVED_ACCOUNT.json new file mode 100644 index 0000000000..e3c9c60b70 --- /dev/null +++ b/libs/events/generated/payments/v1.0.0/SAVED_ACCOUNT.json @@ -0,0 +1,73 @@ +{ + "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", + "reference", + "createdAt", + "connectorId", + "provider", + "defaultAsset", + "accountName", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "reference": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "connectorId": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "defaultAsset": { + "type": "string" + }, + "accountName": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "UNKNOWN", + "INTERNAL", + "EXTERNAL" + ] + } + } + } + }, + "required": [ + "date", + "app", + "version", + "type", + "payload" + ] +} \ No newline at end of file diff --git a/libs/events/generated/payments/v1.0.0/SAVED_BALANCE.json b/libs/events/generated/payments/v1.0.0/SAVED_BALANCE.json new file mode 100644 index 0000000000..57ccd355fc --- /dev/null +++ b/libs/events/generated/payments/v1.0.0/SAVED_BALANCE.json @@ -0,0 +1,57 @@ +{ + "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" + ] +} \ No newline at end of file diff --git a/libs/events/generated/payments/v1.0.0/SAVED_BANK_ACCOUNT.json b/libs/events/generated/payments/v1.0.0/SAVED_BANK_ACCOUNT.json new file mode 100644 index 0000000000..490a1b1561 --- /dev/null +++ b/libs/events/generated/payments/v1.0.0/SAVED_BANK_ACCOUNT.json @@ -0,0 +1,95 @@ +{ + "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", + "country" + ], + "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" + }, + "adjustments": { + "type": [ + "array", + "null" + ], + "items": { + "type": "object", + "required": [ + "id", + "createdAt", + "accountID", + "connectorID", + "provider" + ], + "properties": { + "id": { + "type": "string" + }, + "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/v1.0.0/SAVED_PAYMENT.json b/libs/events/generated/payments/v1.0.0/SAVED_PAYMENT.json new file mode 100644 index 0000000000..e89648ad67 --- /dev/null +++ b/libs/events/generated/payments/v1.0.0/SAVED_PAYMENT.json @@ -0,0 +1,146 @@ +{ + "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", + "reference", + "createdAt", + "connectorId", + "provider", + "type", + "status", + "scheme", + "asset", + "amount", + "initialAmount" + ], + "properties": { + "id": { + "type": "string" + }, + "reference": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "connectorId": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "PAY-IN", + "PAYOUT", + "TRANSFER", + "OTHER" + ] + }, + "status": { + "type": "string" + }, + "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" + }, + "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/v1.0.0/SAVED_POOL.json b/libs/events/generated/payments/v1.0.0/SAVED_POOL.json new file mode 100644 index 0000000000..ed5ac463f9 --- /dev/null +++ b/libs/events/generated/payments/v1.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/generated/payments/v1.0.0/SAVED_TRANSFER_INITIATION.json b/libs/events/generated/payments/v1.0.0/SAVED_TRANSFER_INITIATION.json new file mode 100644 index 0000000000..7c26373bb9 --- /dev/null +++ b/libs/events/generated/payments/v1.0.0/SAVED_TRANSFER_INITIATION.json @@ -0,0 +1,145 @@ +{ + "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" + } + } + } + } + } + } + }, + "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 499911ed0f..b13d970d50 100644 --- a/libs/events/index.js +++ b/libs/events/index.js @@ -11,7 +11,9 @@ const yaml = require('yaml'); for(const event of await fs.readdir('services/' + service + '/' + version)) { const rawEventData = await fs.readFile('services/' + service + '/' + version + '/' + event, { encoding: 'utf8' }); base.properties.payload = yaml.parse(rawEventData); - fs.writeFile('generated/' + service + '-' + version + '-' + event + '.json', JSON.stringify(base)); + const directory = 'generated/' + service + '/' + version + '/'; + await fs.mkdir(directory, { recursive: true }); + await fs.writeFile(directory + event.replace('.yaml', '.json'), JSON.stringify(base, null, 2)); } } } diff --git a/libs/go-libs/publish/module.go b/libs/go-libs/publish/module.go index 2811c4ae44..21432e2f87 100644 --- a/libs/go-libs/publish/module.go +++ b/libs/go-libs/publish/module.go @@ -3,11 +3,12 @@ package publish import ( "context" + "sync" + "github.com/ThreeDotsLabs/watermill" "github.com/ThreeDotsLabs/watermill/message" "github.com/ThreeDotsLabs/watermill/pubsub/gochannel" "go.uber.org/fx" - "sync" ) func newGoChannel() *gochannel.GoChannel {