@develit-services/bank 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/database/schema.cjs +1 -1
  2. package/dist/database/schema.d.cts +1 -1
  3. package/dist/database/schema.d.mts +1 -1
  4. package/dist/database/schema.d.ts +1 -1
  5. package/dist/database/schema.mjs +1 -1
  6. package/dist/export/worker.cjs +6 -6
  7. package/dist/export/worker.d.cts +26 -25
  8. package/dist/export/worker.d.mts +26 -25
  9. package/dist/export/worker.d.ts +26 -25
  10. package/dist/export/worker.mjs +7 -7
  11. package/dist/export/workflows.cjs +3 -3
  12. package/dist/export/workflows.mjs +3 -3
  13. package/dist/shared/{bank.DJ9d1yaR.mjs → bank.BVoTAfMF.mjs} +75 -62
  14. package/dist/shared/{bank.RUV2HUFo.mjs → bank.Buq4PwHY.mjs} +28 -28
  15. package/dist/shared/{bank.BQSnGZ-3.d.cts → bank.C54o3LW_.d.mts} +3 -3
  16. package/dist/shared/{bank.mub5_S4r.d.cts → bank.DC2gbqhD.d.cts} +10 -10
  17. package/dist/shared/{bank.mub5_S4r.d.mts → bank.DC2gbqhD.d.mts} +10 -10
  18. package/dist/shared/{bank.mub5_S4r.d.ts → bank.DC2gbqhD.d.ts} +10 -10
  19. package/dist/shared/{bank.8lAQLFNI.mjs → bank.DC5Hk4UF.mjs} +1 -1
  20. package/dist/shared/{bank.UfRkUN2y.cjs → bank.DN3pRw5j.cjs} +28 -28
  21. package/dist/shared/{bank.DOJ8gbXQ.cjs → bank.DTMwkDFH.cjs} +75 -62
  22. package/dist/shared/{bank.DW3cHO1u.d.mts → bank.DXWYeekU.d.ts} +3 -3
  23. package/dist/shared/{bank.CouYVuOf.d.ts → bank.Djg_pGS7.d.cts} +3 -3
  24. package/dist/shared/{bank.DISsqBb6.cjs → bank._ilV3SSc.cjs} +1 -1
  25. package/dist/types.cjs +2 -2
  26. package/dist/types.d.cts +6 -5
  27. package/dist/types.d.mts +6 -5
  28. package/dist/types.d.ts +6 -5
  29. package/dist/types.mjs +2 -2
  30. package/package.json +1 -1
@@ -177,26 +177,46 @@ const mapFinbricksTransactionStatus = (status) => {
177
177
  const mapFinbricksBatchStatus = (status) => {
178
178
  return status === "REJECTED" ? "FAILED" : status === "AUTHORIZED" ? "PROCESSING" : "READY_TO_SIGN";
179
179
  };
180
+
181
+ const mapFinbricksAccountInsert = ({
182
+ account,
183
+ connectorKey,
184
+ status
185
+ }) => ({
186
+ id: account.id,
187
+ bankRefId: account.bankRefId,
188
+ connectorKey,
189
+ status,
190
+ currency: account.currency,
191
+ number: account.identification.accountNumber,
192
+ bankCode: account.servicer.bankCode,
193
+ // For now we are using CZE as fallback because finbricks does not provide country code 100% of the time
194
+ countryCode: account.servicer.countryCode || "CZE",
195
+ holderName: account.ownersNames.join(", "),
196
+ iban: account.identification.iban
197
+ });
198
+
180
199
  const mapFinbricksTransactionToPayment = (tx, account) => {
181
200
  const isIncoming = tx.creditDebitIndicator === "CRDT";
182
201
  const related = tx.entryDetails?.transactionDetails?.relatedParties;
183
202
  const base = {
184
203
  id: backendSdk.uuidv4(),
185
204
  correlationId: backendSdk.uuidv4(),
205
+ //TODO(kleinpetr): use real correlationId once available
186
206
  connectorKey: account.connectorKey,
187
207
  accountId: account.id,
188
- bankRefId: tx.entryReference || tx.fbxReference,
208
+ bankRefId: tx.fbxReference || tx.entryReference,
189
209
  amount: tx.amount?.value || 0,
190
210
  currency: tx.amount?.currency || "CZK",
191
211
  paymentType: "DOMESTIC",
192
212
  status: mapFinbricksStatus(tx.status),
193
- message: tx.entryDetails.transactionDetails?.remittanceInformation?.unstructured || tx.entryDetails.transactionDetails?.additionalRemittanceInformation || null,
213
+ message: tx.entryDetails.transactionDetails?.remittanceInformation?.unstructured || tx.entryDetails.transactionDetails?.additionalRemittanceInformation || tx.entryDetails.transactionDetails?.additionalTransactionInformation || null,
194
214
  processedAt: new Date(tx.bookingDate.date),
195
215
  ...mapReferencesToPayment(
196
216
  tx.entryDetails.transactionDetails?.remittanceInformation?.structured?.creditorReferenceInformation?.reference || tx.entryDetails.transactionDetails?.references?.endToEndIdentification
197
217
  ),
198
218
  creditor: {
199
- holderName: isIncoming ? "Unknown" : related?.creditor?.name || "Unknown",
219
+ holderName: related?.creditor?.name || "Unknown",
200
220
  iban: isIncoming ? account.iban || void 0 : related.creditorAccount?.identification?.iban || account.iban || void 0,
201
221
  number: isIncoming ? account.number || void 0 : related.creditorAccount?.identification?.other?.identification ? related.creditorAccount.identification.other.identification.split(
202
222
  "/"
@@ -206,7 +226,7 @@ const mapFinbricksTransactionToPayment = (tx, account) => {
206
226
  )[1] : account.bankCode || void 0
207
227
  },
208
228
  debtor: {
209
- holderName: isIncoming ? related?.debtor?.name || "Unknown" : "Unknown",
229
+ holderName: related?.debtor?.name || "Unknown",
210
230
  iban: isIncoming ? related.debtorAccount?.identification?.iban || account.iban || void 0 : account.iban ?? void 0,
211
231
  number: isIncoming ? related.debtorAccount?.identification?.other?.identification ? related.debtorAccount.identification.other.identification.split(
212
232
  "/"
@@ -215,31 +235,11 @@ const mapFinbricksTransactionToPayment = (tx, account) => {
215
235
  "/"
216
236
  )[1] : account.bankCode || void 0 : account.bankCode || void 0
217
237
  },
218
- direction: "INCOMING"
219
- // přepíšeme správným směrem níže
238
+ direction: isIncoming ? "INCOMING" : "OUTGOING"
220
239
  };
221
- base.direction = isIncoming ? "INCOMING" : "OUTGOING";
222
240
  return base;
223
241
  };
224
242
 
225
- const mapFinbricksAccountInsert = ({
226
- account,
227
- connectorKey,
228
- status
229
- }) => ({
230
- id: account.id,
231
- bankRefId: account.bankRefId,
232
- connectorKey,
233
- status,
234
- currency: account.currency,
235
- number: account.identification.accountNumber,
236
- bankCode: account.servicer.bankCode,
237
- // For now we are using CZE as fallback because finbricks does not provide country code 100% of the time
238
- countryCode: account.servicer.countryCode || "CZE",
239
- holderName: account.ownersNames.join(", "),
240
- iban: account.identification.iban
241
- });
242
-
243
243
  class FinbricksConnector extends IBankConnector {
244
244
  constructor(provider, {
245
245
  BASE_URI,
@@ -1044,9 +1044,9 @@ class MockConnector extends IBankConnector {
1044
1044
  }
1045
1045
  }
1046
1046
 
1047
- const PAYMENT_TYPES = ["SEPA", "SWIFT", "IFSC", "DOMESTIC"];
1047
+ const PAYMENT_TYPES = ["SEPA", "SWIFT", "DOMESTIC", "UNKNOWN"];
1048
1048
  const CHARGE_BEARERS = ["SHA", "OUR", "BEN"];
1049
- const INSTRUCTION_PRIORITIES = ["NORM", "INST"];
1049
+ const INSTRUCTION_PRIORITIES = ["NORM", "HIGH", "INST"];
1050
1050
  const PAYMENT_STATUSES = [
1051
1051
  "PREPARED",
1052
1052
  "INITIALIZED",
@@ -1177,7 +1177,7 @@ const payment = sqliteCore.sqliteTable("payment", {
1177
1177
  connectorKey: sqliteCore.text("connector_key", { enum: CONNECTOR_KEYS }).$type().notNull(),
1178
1178
  amount: sqliteCore.real("amount").notNull(),
1179
1179
  direction: sqliteCore.text("direction").$type().notNull(),
1180
- paymentType: sqliteCore.text("payment_type").$type(),
1180
+ paymentType: sqliteCore.text("payment_type").$type().notNull(),
1181
1181
  currency: sqliteCore.text("currency").$type().notNull(),
1182
1182
  status: sqliteCore.text("status").$type().notNull(),
1183
1183
  statusReason: sqliteCore.text("status_reason"),
@@ -3,16 +3,20 @@
3
3
  const cloudflare_workers = require('cloudflare:workers');
4
4
  const cloudflare_workflows = require('cloudflare:workflows');
5
5
  const d1 = require('drizzle-orm/d1');
6
- const database_schema = require('./bank.UfRkUN2y.cjs');
7
- require('@develit-io/backend-sdk');
6
+ const database_schema = require('./bank.DN3pRw5j.cjs');
7
+ const backendSdk = require('@develit-io/backend-sdk');
8
8
  const drizzleOrm = require('drizzle-orm');
9
- const mockCobs_connector = require('./bank.DISsqBb6.cjs');
9
+ const mockCobs_connector = require('./bank._ilV3SSc.cjs');
10
10
  require('jose');
11
11
  require('@develit-io/general-codes');
12
12
 
13
13
  const createPaymentCommand = (db, { payment }) => {
14
14
  return {
15
- command: db.insert(database_schema.tables.payment).values(payment).returning()
15
+ command: db.insert(database_schema.tables.payment).values({
16
+ ...payment,
17
+ creditorIban: payment.creditor.iban,
18
+ debtorIban: payment.debtor.iban
19
+ }).returning()
16
20
  };
17
21
  };
18
22
 
@@ -154,10 +158,15 @@ class SyncAccountPaymentsWorkflow extends cloudflare_workers.WorkflowEntrypoint
154
158
  return credentials2;
155
159
  }
156
160
  );
157
- const connector = await step.do(
158
- `init ${account.connectorKey} connector`,
161
+ const payments = await step.do(
162
+ "fetch bank payments",
163
+ {
164
+ retries: { limit: 5, delay: 2e3, backoff: "constant" },
165
+ timeout: "30 seconds"
166
+ },
159
167
  async () => {
160
- return initiateConnector({
168
+ console.log("starting connector initiation");
169
+ const connector = initiateConnector({
161
170
  env: this.env,
162
171
  bank: account.connectorKey,
163
172
  connectedAccounts: [
@@ -168,15 +177,7 @@ class SyncAccountPaymentsWorkflow extends cloudflare_workers.WorkflowEntrypoint
168
177
  }
169
178
  ]
170
179
  });
171
- }
172
- );
173
- const payments = await step.do(
174
- "fetch bank payments",
175
- {
176
- retries: { limit: 5, delay: 2e3, backoff: "constant" },
177
- timeout: "30 seconds"
178
- },
179
- async () => {
180
+ console.log("fetching payments from connector");
180
181
  const fetched = await connector.getAllAccountPayments({
181
182
  environment: this.env.ENVIRONMENT,
182
183
  db,
@@ -194,6 +195,7 @@ class SyncAccountPaymentsWorkflow extends cloudflare_workers.WorkflowEntrypoint
194
195
  }
195
196
  const bankRefIds = payments.map((payment) => payment.bankRefId).filter(Boolean);
196
197
  const existing = await step.do("load existing payments", async () => {
198
+ console.log("load existing payments");
197
199
  return await getPaymentsByBankRefIdsQuery(db, {
198
200
  ids: bankRefIds
199
201
  });
@@ -201,59 +203,70 @@ class SyncAccountPaymentsWorkflow extends cloudflare_workers.WorkflowEntrypoint
201
203
  const paymentsToUpdate = payments.filter(
202
204
  (p) => existing.some((e) => e.bankRefId === p.bankRefId)
203
205
  );
204
- if (paymentsToUpdate.length)
205
- await step.do("update existing payments", async () => {
206
- const commands = paymentsToUpdate.map(
207
- (p) => updatePaymentCommand(db, { payment: p }).command
208
- );
209
- await db.batch([commands[0], ...commands.slice(1)]);
210
- await pushToQueue(
211
- this.env.QUEUE_BUS_QUEUE,
212
- paymentsToUpdate.map((p) => ({
213
- eventType: "BANK_PAYMENT",
214
- eventSignal: "paymentUpdated",
215
- bankPayment: p,
216
- metadata: {
217
- correlationId: p.correlationId,
218
- entityId: p.id,
219
- idempotencySuffix: p.status,
220
- timestamp: (/* @__PURE__ */ new Date()).toDateString()
221
- }
222
- }))
223
- );
224
- });
225
206
  const paymentsToCreate = payments.filter(
226
207
  (p) => !existing.some((e) => e.bankRefId === p.bankRefId)
227
208
  );
228
- if (paymentsToCreate.length)
229
- await step.do("create new payments", async () => {
230
- const commands = paymentsToCreate.map(
231
- (p) => createPaymentCommand(db, { payment: p }).command
209
+ await step.do("process payments and update lastSyncAt", async () => {
210
+ const eventsToEmit = [];
211
+ console.log("process payments and update lastSyncAt");
212
+ const updateCommands = paymentsToUpdate.map(
213
+ (p) => updatePaymentCommand(db, { payment: p }).command
214
+ );
215
+ eventsToEmit.push(
216
+ ...paymentsToUpdate.map((p) => ({
217
+ eventType: "BANK_PAYMENT",
218
+ eventSignal: "paymentUpdated",
219
+ bankPayment: p,
220
+ metadata: {
221
+ correlationId: p.correlationId,
222
+ entityId: p.id,
223
+ idempotencySuffix: p.status,
224
+ timestamp: (/* @__PURE__ */ new Date()).toDateString()
225
+ }
226
+ }))
227
+ );
228
+ const createCommands = paymentsToCreate.map(
229
+ (p) => createPaymentCommand(db, { payment: p }).command
230
+ );
231
+ eventsToEmit.push(
232
+ ...paymentsToCreate.map((p) => ({
233
+ eventType: "BANK_PAYMENT",
234
+ eventSignal: "paymentCreated",
235
+ bankPayment: p,
236
+ metadata: {
237
+ correlationId: p.correlationId,
238
+ entityId: p.id,
239
+ timestamp: (/* @__PURE__ */ new Date()).toDateString()
240
+ }
241
+ }))
242
+ );
243
+ const latest = payments.reduce((current, p) => {
244
+ return new Date(p.processedAt).getTime() > new Date(current.processedAt).getTime() ? p : current;
245
+ }, payments[0]);
246
+ const updateLastSyncCommand = updateAccountLastSyncCommand(db, {
247
+ accountId: account.id,
248
+ lastSyncedAt: latest.processedAt
249
+ }).command;
250
+ if (eventsToEmit.length) {
251
+ await db.batch(
252
+ backendSdk.asNonEmpty([
253
+ updateLastSyncCommand,
254
+ ...updateCommands,
255
+ ...createCommands
256
+ ])
232
257
  );
233
- await db.batch([commands[0], ...commands.slice(1)]);
234
258
  await pushToQueue(
235
259
  this.env.QUEUE_BUS_QUEUE,
236
- paymentsToCreate.map((p) => ({
237
- eventType: "BANK_PAYMENT",
238
- eventSignal: "paymentCreated",
239
- bankPayment: p,
240
- metadata: {
241
- correlationId: p.correlationId,
242
- entityId: p.id,
243
- timestamp: (/* @__PURE__ */ new Date()).toDateString()
244
- }
245
- }))
260
+ eventsToEmit
246
261
  );
247
- });
248
- await step.do("determine new lastSyncedAt", async () => {
249
- const latest = payments.reduce((current, p) => {
250
- return new Date(p.createdAt).getTime() > new Date(current.createdAt).getTime() ? p : current;
251
- }, payments[0]);
252
- await updateAccountLastSyncCommand(db, {
253
- accountId: account.id,
254
- lastSyncedAt: latest.createdAt
255
- }).command.execute();
256
- return latest.createdAt;
262
+ }
263
+ return {
264
+ payments: payments.length,
265
+ updated: paymentsToUpdate.length,
266
+ created: paymentsToCreate.length,
267
+ eventsEmitted: eventsToEmit.length,
268
+ lastSyncedAt: latest?.createdAt
269
+ };
257
270
  });
258
271
  await step.sleep(
259
272
  "Sleep for next sync",
@@ -1,6 +1,6 @@
1
1
  import { Environment } from '@develit-io/backend-sdk';
2
2
  import { DrizzleD1Database } from 'drizzle-orm/d1';
3
- import { a as PaymentInsertType, t as tables } from './bank.mub5_S4r.mjs';
3
+ import { a as PaymentInsertType, t as tables } from './bank.DC2gbqhD.js';
4
4
  import { CURRENCY_CODES, BANK_CODES, CODES } from '@develit-io/general-codes';
5
5
  import { z } from 'zod';
6
6
  import * as drizzle_zod from 'drizzle-zod';
@@ -19,11 +19,11 @@ interface ConfigEnvironmentBank {
19
19
  allowedProviders: ConnectorKey[];
20
20
  }
21
21
 
22
- declare const PAYMENT_TYPES: readonly ["SEPA", "SWIFT", "IFSC", "DOMESTIC"];
22
+ declare const PAYMENT_TYPES: readonly ["SEPA", "SWIFT", "DOMESTIC", "UNKNOWN"];
23
23
  type PaymentType = (typeof PAYMENT_TYPES)[number];
24
24
  declare const CHARGE_BEARERS: readonly ["SHA", "OUR", "BEN"];
25
25
  type ChargeBearer = (typeof CHARGE_BEARERS)[number];
26
- declare const INSTRUCTION_PRIORITIES: readonly ["NORM", "INST"];
26
+ declare const INSTRUCTION_PRIORITIES: readonly ["NORM", "HIGH", "INST"];
27
27
  type InstructionPriority = (typeof INSTRUCTION_PRIORITIES)[number];
28
28
  declare const PAYMENT_STATUSES: readonly ["PREPARED", "INITIALIZED", "FAILED", "PENDING", "COMPLETED", "CREATED"];
29
29
  type PaymentStatus = (typeof PAYMENT_STATUSES)[number];
@@ -1,6 +1,6 @@
1
1
  import { Environment } from '@develit-io/backend-sdk';
2
2
  import { DrizzleD1Database } from 'drizzle-orm/d1';
3
- import { a as PaymentInsertType, t as tables } from './bank.mub5_S4r.js';
3
+ import { a as PaymentInsertType, t as tables } from './bank.DC2gbqhD.cjs';
4
4
  import { CURRENCY_CODES, BANK_CODES, CODES } from '@develit-io/general-codes';
5
5
  import { z } from 'zod';
6
6
  import * as drizzle_zod from 'drizzle-zod';
@@ -19,11 +19,11 @@ interface ConfigEnvironmentBank {
19
19
  allowedProviders: ConnectorKey[];
20
20
  }
21
21
 
22
- declare const PAYMENT_TYPES: readonly ["SEPA", "SWIFT", "IFSC", "DOMESTIC"];
22
+ declare const PAYMENT_TYPES: readonly ["SEPA", "SWIFT", "DOMESTIC", "UNKNOWN"];
23
23
  type PaymentType = (typeof PAYMENT_TYPES)[number];
24
24
  declare const CHARGE_BEARERS: readonly ["SHA", "OUR", "BEN"];
25
25
  type ChargeBearer = (typeof CHARGE_BEARERS)[number];
26
- declare const INSTRUCTION_PRIORITIES: readonly ["NORM", "INST"];
26
+ declare const INSTRUCTION_PRIORITIES: readonly ["NORM", "HIGH", "INST"];
27
27
  type InstructionPriority = (typeof INSTRUCTION_PRIORITIES)[number];
28
28
  declare const PAYMENT_STATUSES: readonly ["PREPARED", "INITIALIZED", "FAILED", "PENDING", "COMPLETED", "CREATED"];
29
29
  type PaymentStatus = (typeof PAYMENT_STATUSES)[number];
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const database_schema = require('./bank.UfRkUN2y.cjs');
3
+ const database_schema = require('./bank.DN3pRw5j.cjs');
4
4
 
5
5
  class MockCobsConnector extends database_schema.FinbricksConnector {
6
6
  constructor(config) {
package/dist/types.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const database_schema = require('./shared/bank.UfRkUN2y.cjs');
4
- const mockCobs_connector = require('./shared/bank.DISsqBb6.cjs');
3
+ const database_schema = require('./shared/bank.DN3pRw5j.cjs');
4
+ const mockCobs_connector = require('./shared/bank._ilV3SSc.cjs');
5
5
  const generalCodes = require('@develit-io/general-codes');
6
6
  require('@develit-io/backend-sdk');
7
7
  require('drizzle-orm/sqlite-core');
package/dist/types.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { I as IBankConnector, b as IncomingPaymentMessage, c as InitiatedPayment, a as ConnectorKey, d as ConnectedAccount, e as AccountCredentialsInsertType, f as AccountInsertType, P as PaymentPreparedInsertType, g as InitiatedBatch, B as BatchMetadata, A as AccountSelectType, h as PaymentStatus, i as BatchStatus, j as CurrencyCode, k as BankCode, l as CountryCode, m as AuthInput, n as Currency } from './shared/bank.BQSnGZ-3.cjs';
2
- export { D as ACCOUNT_STATUSES, Y as AccountCredentialsPatchType, Z as AccountCredentialsSelectType, X as AccountCredentialsUpdateType, S as AccountPatchType, E as AccountStatus, R as AccountUpdateType, q as BATCH_STATUES, q as BATCH_STATUSES, G as BankAccountWithLastSync, t as CHARGE_BEARERS, H as CONNECTOR_KEYS, F as COUNTRY_CODES, J as CREDENTIALS_TYPES, u as ChargeBearer, C as ConfigEnvironmentBank, K as CredentialsType, v as INSTRUCTION_PRIORITIES, w as InstructionPriority, O as OutgoingPaymentMessage, y as PAYMENT_DIRECTIONS, x as PAYMENT_STATUSES, r as PAYMENT_TYPES, z as PaymentDirection, o as PaymentFailedInsertType, s as PaymentType, T as TOKEN_TYPES, L as TokenType, U as accountCredentialsInsertSchema, W as accountCredentialsSelectSchema, V as accountCredentialsUpdateSchema, M as accountInsertSchema, Q as accountSelectSchema, N as accountUpdateSchema, p as paymentInitializedInsertType } from './shared/bank.BQSnGZ-3.cjs';
3
- import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.mub5_S4r.cjs';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.mub5_S4r.cjs';
1
+ import { I as IBankConnector, b as IncomingPaymentMessage, c as InitiatedPayment, a as ConnectorKey, d as ConnectedAccount, e as AccountCredentialsInsertType, f as AccountInsertType, P as PaymentPreparedInsertType, g as InitiatedBatch, B as BatchMetadata, A as AccountSelectType, h as PaymentStatus, i as BatchStatus, j as CurrencyCode, k as BankCode, l as CountryCode, m as AuthInput, n as Currency } from './shared/bank.Djg_pGS7.cjs';
2
+ export { D as ACCOUNT_STATUSES, Y as AccountCredentialsPatchType, Z as AccountCredentialsSelectType, X as AccountCredentialsUpdateType, S as AccountPatchType, E as AccountStatus, R as AccountUpdateType, q as BATCH_STATUES, q as BATCH_STATUSES, G as BankAccountWithLastSync, t as CHARGE_BEARERS, H as CONNECTOR_KEYS, F as COUNTRY_CODES, J as CREDENTIALS_TYPES, u as ChargeBearer, C as ConfigEnvironmentBank, K as CredentialsType, v as INSTRUCTION_PRIORITIES, w as InstructionPriority, O as OutgoingPaymentMessage, y as PAYMENT_DIRECTIONS, x as PAYMENT_STATUSES, r as PAYMENT_TYPES, z as PaymentDirection, o as PaymentFailedInsertType, s as PaymentType, T as TOKEN_TYPES, L as TokenType, U as accountCredentialsInsertSchema, W as accountCredentialsSelectSchema, V as accountCredentialsUpdateSchema, M as accountInsertSchema, Q as accountSelectSchema, N as accountUpdateSchema, p as paymentInitializedInsertType } from './shared/bank.Djg_pGS7.cjs';
3
+ import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.DC2gbqhD.cjs';
4
+ export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.DC2gbqhD.cjs';
5
5
  import { Environment, BaseEvent } from '@develit-io/backend-sdk';
6
6
  import { DrizzleD1Database } from 'drizzle-orm/d1';
7
7
  export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.BchnXQDL.cjs';
@@ -220,7 +220,7 @@ type FinbricksAddress = {
220
220
  adressLine: string;
221
221
  };
222
222
  type FinbricksTransaction = {
223
- fbxReference: string;
223
+ fbxReference: string | null;
224
224
  entryReference: string;
225
225
  amount: FinbricksAmount;
226
226
  creditDebitIndicator: string;
@@ -319,6 +319,7 @@ type FinbricksTransaction = {
319
319
  };
320
320
  };
321
321
  additionalRemittanceInformation: string;
322
+ additionalTransactionInformation: string;
322
323
  };
323
324
  };
324
325
  };
package/dist/types.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { I as IBankConnector, b as IncomingPaymentMessage, c as InitiatedPayment, a as ConnectorKey, d as ConnectedAccount, e as AccountCredentialsInsertType, f as AccountInsertType, P as PaymentPreparedInsertType, g as InitiatedBatch, B as BatchMetadata, A as AccountSelectType, h as PaymentStatus, i as BatchStatus, j as CurrencyCode, k as BankCode, l as CountryCode, m as AuthInput, n as Currency } from './shared/bank.DW3cHO1u.mjs';
2
- export { D as ACCOUNT_STATUSES, Y as AccountCredentialsPatchType, Z as AccountCredentialsSelectType, X as AccountCredentialsUpdateType, S as AccountPatchType, E as AccountStatus, R as AccountUpdateType, q as BATCH_STATUES, q as BATCH_STATUSES, G as BankAccountWithLastSync, t as CHARGE_BEARERS, H as CONNECTOR_KEYS, F as COUNTRY_CODES, J as CREDENTIALS_TYPES, u as ChargeBearer, C as ConfigEnvironmentBank, K as CredentialsType, v as INSTRUCTION_PRIORITIES, w as InstructionPriority, O as OutgoingPaymentMessage, y as PAYMENT_DIRECTIONS, x as PAYMENT_STATUSES, r as PAYMENT_TYPES, z as PaymentDirection, o as PaymentFailedInsertType, s as PaymentType, T as TOKEN_TYPES, L as TokenType, U as accountCredentialsInsertSchema, W as accountCredentialsSelectSchema, V as accountCredentialsUpdateSchema, M as accountInsertSchema, Q as accountSelectSchema, N as accountUpdateSchema, p as paymentInitializedInsertType } from './shared/bank.DW3cHO1u.mjs';
3
- import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.mub5_S4r.mjs';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.mub5_S4r.mjs';
1
+ import { I as IBankConnector, b as IncomingPaymentMessage, c as InitiatedPayment, a as ConnectorKey, d as ConnectedAccount, e as AccountCredentialsInsertType, f as AccountInsertType, P as PaymentPreparedInsertType, g as InitiatedBatch, B as BatchMetadata, A as AccountSelectType, h as PaymentStatus, i as BatchStatus, j as CurrencyCode, k as BankCode, l as CountryCode, m as AuthInput, n as Currency } from './shared/bank.C54o3LW_.mjs';
2
+ export { D as ACCOUNT_STATUSES, Y as AccountCredentialsPatchType, Z as AccountCredentialsSelectType, X as AccountCredentialsUpdateType, S as AccountPatchType, E as AccountStatus, R as AccountUpdateType, q as BATCH_STATUES, q as BATCH_STATUSES, G as BankAccountWithLastSync, t as CHARGE_BEARERS, H as CONNECTOR_KEYS, F as COUNTRY_CODES, J as CREDENTIALS_TYPES, u as ChargeBearer, C as ConfigEnvironmentBank, K as CredentialsType, v as INSTRUCTION_PRIORITIES, w as InstructionPriority, O as OutgoingPaymentMessage, y as PAYMENT_DIRECTIONS, x as PAYMENT_STATUSES, r as PAYMENT_TYPES, z as PaymentDirection, o as PaymentFailedInsertType, s as PaymentType, T as TOKEN_TYPES, L as TokenType, U as accountCredentialsInsertSchema, W as accountCredentialsSelectSchema, V as accountCredentialsUpdateSchema, M as accountInsertSchema, Q as accountSelectSchema, N as accountUpdateSchema, p as paymentInitializedInsertType } from './shared/bank.C54o3LW_.mjs';
3
+ import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.DC2gbqhD.mjs';
4
+ export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.DC2gbqhD.mjs';
5
5
  import { Environment, BaseEvent } from '@develit-io/backend-sdk';
6
6
  import { DrizzleD1Database } from 'drizzle-orm/d1';
7
7
  export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.BchnXQDL.mjs';
@@ -220,7 +220,7 @@ type FinbricksAddress = {
220
220
  adressLine: string;
221
221
  };
222
222
  type FinbricksTransaction = {
223
- fbxReference: string;
223
+ fbxReference: string | null;
224
224
  entryReference: string;
225
225
  amount: FinbricksAmount;
226
226
  creditDebitIndicator: string;
@@ -319,6 +319,7 @@ type FinbricksTransaction = {
319
319
  };
320
320
  };
321
321
  additionalRemittanceInformation: string;
322
+ additionalTransactionInformation: string;
322
323
  };
323
324
  };
324
325
  };
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { I as IBankConnector, b as IncomingPaymentMessage, c as InitiatedPayment, a as ConnectorKey, d as ConnectedAccount, e as AccountCredentialsInsertType, f as AccountInsertType, P as PaymentPreparedInsertType, g as InitiatedBatch, B as BatchMetadata, A as AccountSelectType, h as PaymentStatus, i as BatchStatus, j as CurrencyCode, k as BankCode, l as CountryCode, m as AuthInput, n as Currency } from './shared/bank.CouYVuOf.js';
2
- export { D as ACCOUNT_STATUSES, Y as AccountCredentialsPatchType, Z as AccountCredentialsSelectType, X as AccountCredentialsUpdateType, S as AccountPatchType, E as AccountStatus, R as AccountUpdateType, q as BATCH_STATUES, q as BATCH_STATUSES, G as BankAccountWithLastSync, t as CHARGE_BEARERS, H as CONNECTOR_KEYS, F as COUNTRY_CODES, J as CREDENTIALS_TYPES, u as ChargeBearer, C as ConfigEnvironmentBank, K as CredentialsType, v as INSTRUCTION_PRIORITIES, w as InstructionPriority, O as OutgoingPaymentMessage, y as PAYMENT_DIRECTIONS, x as PAYMENT_STATUSES, r as PAYMENT_TYPES, z as PaymentDirection, o as PaymentFailedInsertType, s as PaymentType, T as TOKEN_TYPES, L as TokenType, U as accountCredentialsInsertSchema, W as accountCredentialsSelectSchema, V as accountCredentialsUpdateSchema, M as accountInsertSchema, Q as accountSelectSchema, N as accountUpdateSchema, p as paymentInitializedInsertType } from './shared/bank.CouYVuOf.js';
3
- import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.mub5_S4r.js';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.mub5_S4r.js';
1
+ import { I as IBankConnector, b as IncomingPaymentMessage, c as InitiatedPayment, a as ConnectorKey, d as ConnectedAccount, e as AccountCredentialsInsertType, f as AccountInsertType, P as PaymentPreparedInsertType, g as InitiatedBatch, B as BatchMetadata, A as AccountSelectType, h as PaymentStatus, i as BatchStatus, j as CurrencyCode, k as BankCode, l as CountryCode, m as AuthInput, n as Currency } from './shared/bank.DXWYeekU.js';
2
+ export { D as ACCOUNT_STATUSES, Y as AccountCredentialsPatchType, Z as AccountCredentialsSelectType, X as AccountCredentialsUpdateType, S as AccountPatchType, E as AccountStatus, R as AccountUpdateType, q as BATCH_STATUES, q as BATCH_STATUSES, G as BankAccountWithLastSync, t as CHARGE_BEARERS, H as CONNECTOR_KEYS, F as COUNTRY_CODES, J as CREDENTIALS_TYPES, u as ChargeBearer, C as ConfigEnvironmentBank, K as CredentialsType, v as INSTRUCTION_PRIORITIES, w as InstructionPriority, O as OutgoingPaymentMessage, y as PAYMENT_DIRECTIONS, x as PAYMENT_STATUSES, r as PAYMENT_TYPES, z as PaymentDirection, o as PaymentFailedInsertType, s as PaymentType, T as TOKEN_TYPES, L as TokenType, U as accountCredentialsInsertSchema, W as accountCredentialsSelectSchema, V as accountCredentialsUpdateSchema, M as accountInsertSchema, Q as accountSelectSchema, N as accountUpdateSchema, p as paymentInitializedInsertType } from './shared/bank.DXWYeekU.js';
3
+ import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.DC2gbqhD.js';
4
+ export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.DC2gbqhD.js';
5
5
  import { Environment, BaseEvent } from '@develit-io/backend-sdk';
6
6
  import { DrizzleD1Database } from 'drizzle-orm/d1';
7
7
  export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.BchnXQDL.js';
@@ -220,7 +220,7 @@ type FinbricksAddress = {
220
220
  adressLine: string;
221
221
  };
222
222
  type FinbricksTransaction = {
223
- fbxReference: string;
223
+ fbxReference: string | null;
224
224
  entryReference: string;
225
225
  amount: FinbricksAmount;
226
226
  creditDebitIndicator: string;
@@ -319,6 +319,7 @@ type FinbricksTransaction = {
319
319
  };
320
320
  };
321
321
  additionalRemittanceInformation: string;
322
+ additionalTransactionInformation: string;
322
323
  };
323
324
  };
324
325
  };
package/dist/types.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, C as CHARGE_BEARERS, g as CONNECTOR_KEYS, f as COUNTRY_CODES, h as CREDENTIALS_TYPES, E as ErsteConnector, b as FINBRICKS_ENDPOINTS, a as FinbricksClient, F as FinbricksConnector, I as IBankConnector, c as INSTRUCTION_PRIORITIES, M as MockConnector, e as PAYMENT_DIRECTIONS, d as PAYMENT_STATUSES, P as PAYMENT_TYPES, T as TOKEN_TYPES, l as accountCredentialsInsertSchema, n as accountCredentialsSelectSchema, m as accountCredentialsUpdateSchema, i as accountInsertSchema, k as accountSelectSchema, j as accountUpdateSchema, o as ottInsertSchema, r as ottSelectSchema, q as ottUpdateSchema, p as paymentInsertTypeZod, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.RUV2HUFo.mjs';
2
- export { M as MockCobsConnector } from './shared/bank.8lAQLFNI.mjs';
1
+ export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, C as CHARGE_BEARERS, g as CONNECTOR_KEYS, f as COUNTRY_CODES, h as CREDENTIALS_TYPES, E as ErsteConnector, b as FINBRICKS_ENDPOINTS, a as FinbricksClient, F as FinbricksConnector, I as IBankConnector, c as INSTRUCTION_PRIORITIES, M as MockConnector, e as PAYMENT_DIRECTIONS, d as PAYMENT_STATUSES, P as PAYMENT_TYPES, T as TOKEN_TYPES, l as accountCredentialsInsertSchema, n as accountCredentialsSelectSchema, m as accountCredentialsUpdateSchema, i as accountInsertSchema, k as accountSelectSchema, j as accountUpdateSchema, o as ottInsertSchema, r as ottSelectSchema, q as ottUpdateSchema, p as paymentInsertTypeZod, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.Buq4PwHY.mjs';
2
+ export { M as MockCobsConnector } from './shared/bank.DC5Hk4UF.mjs';
3
3
  export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
4
4
  import '@develit-io/backend-sdk';
5
5
  import 'drizzle-orm/sqlite-core';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/bank",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {