@develit-services/bank 0.1.9 → 0.2.1

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 +7 -123
  7. package/dist/export/worker.d.cts +14 -17
  8. package/dist/export/worker.d.mts +14 -17
  9. package/dist/export/worker.d.ts +14 -17
  10. package/dist/export/worker.mjs +7 -123
  11. package/dist/export/workflows.cjs +27 -20
  12. package/dist/export/workflows.mjs +27 -20
  13. package/dist/shared/{bank.DouutABZ.d.mts → bank.2BgwPCw_.d.ts} +2 -2
  14. package/dist/shared/{bank.-FurAs09.cjs → bank.B5dSMikM.cjs} +2 -7
  15. package/dist/shared/{bank.CsvBtQib.d.cts → bank.BGZYksmV.d.cts} +12 -8
  16. package/dist/shared/{bank.CsvBtQib.d.mts → bank.BGZYksmV.d.mts} +12 -8
  17. package/dist/shared/{bank.CsvBtQib.d.ts → bank.BGZYksmV.d.ts} +12 -8
  18. package/dist/shared/{bank.CRVH1wUH.d.cts → bank.BOe_Qmuw.d.mts} +2 -2
  19. package/dist/shared/{bank.BvXwHpBp.mjs → bank.BcDo3cbz.mjs} +1 -1
  20. package/dist/shared/{bank.DTdKHhGd.mjs → bank.CpoWaBu0.mjs} +4 -8
  21. package/dist/shared/{bank.W4h6Dlzi.mjs → bank.DdvSjgls.mjs} +17 -8
  22. package/dist/shared/{bank.z4VxSea3.cjs → bank.DhuHP2ky.cjs} +1 -1
  23. package/dist/shared/{bank.tLe0jhjo.cjs → bank.NAgd77sr.cjs} +17 -8
  24. package/dist/shared/{bank.Ckn_klvT.d.ts → bank.RD4xwHFf.d.cts} +2 -2
  25. package/dist/types.cjs +2 -2
  26. package/dist/types.d.cts +11 -9
  27. package/dist/types.d.mts +11 -9
  28. package/dist/types.d.ts +11 -9
  29. package/dist/types.mjs +2 -2
  30. package/package.json +1 -1
@@ -198,7 +198,7 @@ const mapFinbricksAccountInsert = ({
198
198
  });
199
199
 
200
200
  const mapFinbricksTransactionToPayment = (tx, account) => {
201
- const isIncoming = tx.creditDebitIndicator === "CRDT";
201
+ const isIncoming = tx.creditDebitIndicator !== "DBIT";
202
202
  const related = tx.entryDetails?.transactionDetails?.relatedParties;
203
203
  const base = {
204
204
  id: backendSdk.uuidv4(),
@@ -217,7 +217,7 @@ const mapFinbricksTransactionToPayment = (tx, account) => {
217
217
  tx.entryDetails.transactionDetails?.remittanceInformation?.structured?.creditorReferenceInformation?.reference || tx.entryDetails.transactionDetails?.references?.endToEndIdentification
218
218
  ),
219
219
  creditor: {
220
- holderName: related?.creditor?.name || "Unknown",
220
+ holderName: related?.creditorAccount?.name || related?.creditor?.name || "Unknown",
221
221
  iban: isIncoming ? account.iban || void 0 : related.creditorAccount?.identification?.iban || account.iban || void 0,
222
222
  number: isIncoming ? account.number || void 0 : related.creditorAccount?.identification?.other?.identification ? related.creditorAccount.identification.other.identification.split(
223
223
  "/"
@@ -227,7 +227,7 @@ const mapFinbricksTransactionToPayment = (tx, account) => {
227
227
  )[1] : account.bankCode || void 0
228
228
  },
229
229
  debtor: {
230
- holderName: related?.debtor?.name || "Unknown",
230
+ holderName: related?.debtorAccount?.name || related?.debtor?.name || "Unknown",
231
231
  iban: isIncoming ? related.debtorAccount?.identification?.iban || account.iban || void 0 : account.iban ?? void 0,
232
232
  number: isIncoming ? related.debtorAccount?.identification?.other?.identification ? related.debtorAccount.identification.other.identification.split(
233
233
  "/"
@@ -664,7 +664,10 @@ class FinbricksConnector extends IBankConnector {
664
664
  cursor = links?.[0]?.value || null;
665
665
  if (transactions) {
666
666
  for (const tx of transactions) {
667
- allPayments.push(mapFinbricksTransactionToPayment(tx, account));
667
+ allPayments.push({
668
+ raw: tx,
669
+ parsed: mapFinbricksTransactionToPayment(tx, account)
670
+ });
668
671
  }
669
672
  }
670
673
  } while (cursor != null);
@@ -1000,8 +1003,11 @@ class ErsteConnector extends IBankConnector {
1000
1003
  status: "COMPLETED"
1001
1004
  };
1002
1005
  return {
1003
- ...paymentInsert,
1004
- direction: account.iban ? getPaymentDirection(paymentInsert, account.iban) : "INCOMING"
1006
+ raw: payment,
1007
+ parsed: {
1008
+ ...paymentInsert,
1009
+ direction: account.iban ? getPaymentDirection(paymentInsert, account.iban) : "INCOMING"
1010
+ }
1005
1011
  };
1006
1012
  });
1007
1013
  return payments;
@@ -1092,8 +1098,11 @@ class MockConnector extends IBankConnector {
1092
1098
  )
1093
1099
  );
1094
1100
  return payments.map((payment) => ({
1095
- ...payment,
1096
- status: "COMPLETED"
1101
+ raw: payment,
1102
+ parsed: {
1103
+ ...payment,
1104
+ status: "COMPLETED"
1105
+ }
1097
1106
  }));
1098
1107
  }
1099
1108
  getPaymentStatus(_) {
@@ -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.CsvBtQib.js';
3
+ import { a as PaymentInsertType, t as tables, b as ParsedBankPayment } from './bank.BGZYksmV.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';
@@ -114,7 +114,7 @@ declare abstract class IBankConnector {
114
114
  dateFrom: Date;
115
115
  dateTo?: Date;
116
116
  };
117
- }): Promise<PaymentInsertType[]>;
117
+ }): Promise<ParsedBankPayment[]>;
118
118
  abstract getPaymentStatus({ paymentId, }: {
119
119
  paymentId: string;
120
120
  }): Promise<PaymentStatus>;
package/dist/types.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const database_schema = require('./shared/bank.tLe0jhjo.cjs');
4
- const mockCobs_connector = require('./shared/bank.z4VxSea3.cjs');
3
+ const database_schema = require('./shared/bank.NAgd77sr.cjs');
4
+ const mockCobs_connector = require('./shared/bank.DhuHP2ky.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.CRVH1wUH.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.CRVH1wUH.cjs';
3
- import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.CsvBtQib.cjs';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.CsvBtQib.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.RD4xwHFf.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.RD4xwHFf.cjs';
3
+ import { b as ParsedBankPayment, t as tables, P as PaymentSelectType } from './shared/bank.BGZYksmV.cjs';
4
+ export { c as BatchInsertType, B as BatchSelectType, a as PaymentInsertType, p as paymentInsertTypeZod } from './shared/bank.BGZYksmV.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';
@@ -65,7 +65,7 @@ declare class ErsteConnector extends IBankConnector {
65
65
  dateFrom: Date;
66
66
  dateTo?: Date;
67
67
  };
68
- }): Promise<PaymentInsertType[]>;
68
+ }): Promise<ParsedBankPayment[]>;
69
69
  getPaymentStatus(_: {
70
70
  paymentId: string;
71
71
  }): Promise<PaymentStatus>;
@@ -285,7 +285,7 @@ type FinbricksTransaction = {
285
285
  fbxReference: string | null;
286
286
  entryReference: string;
287
287
  amount: FinbricksAmount;
288
- creditDebitIndicator: string;
288
+ creditDebitIndicator: 'CRDT' | 'DBIT';
289
289
  reversalIndicator: boolean;
290
290
  status: string;
291
291
  bookingDate: {
@@ -347,6 +347,7 @@ type FinbricksTransaction = {
347
347
  };
348
348
  };
349
349
  debtorAccount: {
350
+ name: string;
350
351
  identification: {
351
352
  iban: string;
352
353
  other: {
@@ -364,6 +365,7 @@ type FinbricksTransaction = {
364
365
  };
365
366
  };
366
367
  creditorAccount: {
368
+ name: string;
367
369
  identification: {
368
370
  iban: string;
369
371
  other: {
@@ -490,7 +492,7 @@ declare abstract class FinbricksConnector extends IBankConnector {
490
492
  dateFrom: Date;
491
493
  dateTo?: Date;
492
494
  };
493
- }): Promise<PaymentInsertType[]>;
495
+ }): Promise<ParsedBankPayment[]>;
494
496
  getPaymentStatus({ paymentId, }: {
495
497
  paymentId: string;
496
498
  }): Promise<PaymentStatus>;
@@ -524,7 +526,7 @@ declare class MockConnector extends IBankConnector {
524
526
  }): Promise<InitiatedBatch>;
525
527
  getAllAccountPayments({ db, }: {
526
528
  db: DrizzleD1Database<typeof tables>;
527
- }): Promise<PaymentInsertType[]>;
529
+ }): Promise<ParsedBankPayment[]>;
528
530
  getPaymentStatus(_: {
529
531
  paymentId: string;
530
532
  }): Promise<PaymentStatus>;
@@ -1125,5 +1127,5 @@ type OneTimeTokenUpdateType = z.infer<typeof ottInsertSchema>;
1125
1127
  type OneTimeTokenPatchType = z.infer<typeof ottUpdateSchema>;
1126
1128
  type OneTimeTokenSelectType = z.infer<typeof ottSelectSchema>;
1127
1129
 
1128
- export { AccountCredentialsInsertType, AccountInsertType, AccountSelectType, AuthInput, BankCode, BatchMetadata, BatchStatus, ConnectedAccount, ConnectorKey, CountryCode, Currency, CurrencyCode, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, MockCobsConnector, MockConnector, PaymentInsertType, PaymentPreparedInsertType, PaymentSelectType, PaymentStatus, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, useFinbricksFetch };
1130
+ export { AccountCredentialsInsertType, AccountInsertType, AccountSelectType, AuthInput, BankCode, BatchMetadata, BatchStatus, ConnectedAccount, ConnectorKey, CountryCode, Currency, CurrencyCode, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentPreparedInsertType, PaymentSelectType, PaymentStatus, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, useFinbricksFetch };
1129
1131
  export type { BankPaymentEvent, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksAccount, FinbricksAccountTransactionsResponse, FinbricksAccountsListResponse, FinbricksAuthTokenResponse, FinbricksBatchBody, FinbricksBatchResponse, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectAccountResponse, FinbricksConnectorConfig, FinbricksEndpoint, FinbricksEndpointPath, FinbricksFetchConfig, FinbricksForeignPaymentBody, FinbricksGetBatchStatusBody, FinbricksGetBatchStatusResponse, FinbricksGetTransactionStatusResponse, FinbricksJWSData, FinbricksPaymentBody, FinbricksPaymentResponse, FinbricksProvider, FinbricksRequestInit, FinbricksTransactionStatus, OneTimeTokenInsertType, OneTimeTokenPatchType, OneTimeTokenSelectType, OneTimeTokenUpdateType };
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.DouutABZ.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.DouutABZ.mjs';
3
- import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.CsvBtQib.mjs';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.CsvBtQib.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.BOe_Qmuw.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.BOe_Qmuw.mjs';
3
+ import { b as ParsedBankPayment, t as tables, P as PaymentSelectType } from './shared/bank.BGZYksmV.mjs';
4
+ export { c as BatchInsertType, B as BatchSelectType, a as PaymentInsertType, p as paymentInsertTypeZod } from './shared/bank.BGZYksmV.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';
@@ -65,7 +65,7 @@ declare class ErsteConnector extends IBankConnector {
65
65
  dateFrom: Date;
66
66
  dateTo?: Date;
67
67
  };
68
- }): Promise<PaymentInsertType[]>;
68
+ }): Promise<ParsedBankPayment[]>;
69
69
  getPaymentStatus(_: {
70
70
  paymentId: string;
71
71
  }): Promise<PaymentStatus>;
@@ -285,7 +285,7 @@ type FinbricksTransaction = {
285
285
  fbxReference: string | null;
286
286
  entryReference: string;
287
287
  amount: FinbricksAmount;
288
- creditDebitIndicator: string;
288
+ creditDebitIndicator: 'CRDT' | 'DBIT';
289
289
  reversalIndicator: boolean;
290
290
  status: string;
291
291
  bookingDate: {
@@ -347,6 +347,7 @@ type FinbricksTransaction = {
347
347
  };
348
348
  };
349
349
  debtorAccount: {
350
+ name: string;
350
351
  identification: {
351
352
  iban: string;
352
353
  other: {
@@ -364,6 +365,7 @@ type FinbricksTransaction = {
364
365
  };
365
366
  };
366
367
  creditorAccount: {
368
+ name: string;
367
369
  identification: {
368
370
  iban: string;
369
371
  other: {
@@ -490,7 +492,7 @@ declare abstract class FinbricksConnector extends IBankConnector {
490
492
  dateFrom: Date;
491
493
  dateTo?: Date;
492
494
  };
493
- }): Promise<PaymentInsertType[]>;
495
+ }): Promise<ParsedBankPayment[]>;
494
496
  getPaymentStatus({ paymentId, }: {
495
497
  paymentId: string;
496
498
  }): Promise<PaymentStatus>;
@@ -524,7 +526,7 @@ declare class MockConnector extends IBankConnector {
524
526
  }): Promise<InitiatedBatch>;
525
527
  getAllAccountPayments({ db, }: {
526
528
  db: DrizzleD1Database<typeof tables>;
527
- }): Promise<PaymentInsertType[]>;
529
+ }): Promise<ParsedBankPayment[]>;
528
530
  getPaymentStatus(_: {
529
531
  paymentId: string;
530
532
  }): Promise<PaymentStatus>;
@@ -1125,5 +1127,5 @@ type OneTimeTokenUpdateType = z.infer<typeof ottInsertSchema>;
1125
1127
  type OneTimeTokenPatchType = z.infer<typeof ottUpdateSchema>;
1126
1128
  type OneTimeTokenSelectType = z.infer<typeof ottSelectSchema>;
1127
1129
 
1128
- export { AccountCredentialsInsertType, AccountInsertType, AccountSelectType, AuthInput, BankCode, BatchMetadata, BatchStatus, ConnectedAccount, ConnectorKey, CountryCode, Currency, CurrencyCode, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, MockCobsConnector, MockConnector, PaymentInsertType, PaymentPreparedInsertType, PaymentSelectType, PaymentStatus, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, useFinbricksFetch };
1130
+ export { AccountCredentialsInsertType, AccountInsertType, AccountSelectType, AuthInput, BankCode, BatchMetadata, BatchStatus, ConnectedAccount, ConnectorKey, CountryCode, Currency, CurrencyCode, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentPreparedInsertType, PaymentSelectType, PaymentStatus, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, useFinbricksFetch };
1129
1131
  export type { BankPaymentEvent, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksAccount, FinbricksAccountTransactionsResponse, FinbricksAccountsListResponse, FinbricksAuthTokenResponse, FinbricksBatchBody, FinbricksBatchResponse, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectAccountResponse, FinbricksConnectorConfig, FinbricksEndpoint, FinbricksEndpointPath, FinbricksFetchConfig, FinbricksForeignPaymentBody, FinbricksGetBatchStatusBody, FinbricksGetBatchStatusResponse, FinbricksGetTransactionStatusResponse, FinbricksJWSData, FinbricksPaymentBody, FinbricksPaymentResponse, FinbricksProvider, FinbricksRequestInit, FinbricksTransactionStatus, OneTimeTokenInsertType, OneTimeTokenPatchType, OneTimeTokenSelectType, OneTimeTokenUpdateType };
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.Ckn_klvT.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.Ckn_klvT.js';
3
- import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.CsvBtQib.js';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.CsvBtQib.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.2BgwPCw_.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.2BgwPCw_.js';
3
+ import { b as ParsedBankPayment, t as tables, P as PaymentSelectType } from './shared/bank.BGZYksmV.js';
4
+ export { c as BatchInsertType, B as BatchSelectType, a as PaymentInsertType, p as paymentInsertTypeZod } from './shared/bank.BGZYksmV.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';
@@ -65,7 +65,7 @@ declare class ErsteConnector extends IBankConnector {
65
65
  dateFrom: Date;
66
66
  dateTo?: Date;
67
67
  };
68
- }): Promise<PaymentInsertType[]>;
68
+ }): Promise<ParsedBankPayment[]>;
69
69
  getPaymentStatus(_: {
70
70
  paymentId: string;
71
71
  }): Promise<PaymentStatus>;
@@ -285,7 +285,7 @@ type FinbricksTransaction = {
285
285
  fbxReference: string | null;
286
286
  entryReference: string;
287
287
  amount: FinbricksAmount;
288
- creditDebitIndicator: string;
288
+ creditDebitIndicator: 'CRDT' | 'DBIT';
289
289
  reversalIndicator: boolean;
290
290
  status: string;
291
291
  bookingDate: {
@@ -347,6 +347,7 @@ type FinbricksTransaction = {
347
347
  };
348
348
  };
349
349
  debtorAccount: {
350
+ name: string;
350
351
  identification: {
351
352
  iban: string;
352
353
  other: {
@@ -364,6 +365,7 @@ type FinbricksTransaction = {
364
365
  };
365
366
  };
366
367
  creditorAccount: {
368
+ name: string;
367
369
  identification: {
368
370
  iban: string;
369
371
  other: {
@@ -490,7 +492,7 @@ declare abstract class FinbricksConnector extends IBankConnector {
490
492
  dateFrom: Date;
491
493
  dateTo?: Date;
492
494
  };
493
- }): Promise<PaymentInsertType[]>;
495
+ }): Promise<ParsedBankPayment[]>;
494
496
  getPaymentStatus({ paymentId, }: {
495
497
  paymentId: string;
496
498
  }): Promise<PaymentStatus>;
@@ -524,7 +526,7 @@ declare class MockConnector extends IBankConnector {
524
526
  }): Promise<InitiatedBatch>;
525
527
  getAllAccountPayments({ db, }: {
526
528
  db: DrizzleD1Database<typeof tables>;
527
- }): Promise<PaymentInsertType[]>;
529
+ }): Promise<ParsedBankPayment[]>;
528
530
  getPaymentStatus(_: {
529
531
  paymentId: string;
530
532
  }): Promise<PaymentStatus>;
@@ -1125,5 +1127,5 @@ type OneTimeTokenUpdateType = z.infer<typeof ottInsertSchema>;
1125
1127
  type OneTimeTokenPatchType = z.infer<typeof ottUpdateSchema>;
1126
1128
  type OneTimeTokenSelectType = z.infer<typeof ottSelectSchema>;
1127
1129
 
1128
- export { AccountCredentialsInsertType, AccountInsertType, AccountSelectType, AuthInput, BankCode, BatchMetadata, BatchStatus, ConnectedAccount, ConnectorKey, CountryCode, Currency, CurrencyCode, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, MockCobsConnector, MockConnector, PaymentInsertType, PaymentPreparedInsertType, PaymentSelectType, PaymentStatus, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, useFinbricksFetch };
1130
+ export { AccountCredentialsInsertType, AccountInsertType, AccountSelectType, AuthInput, BankCode, BatchMetadata, BatchStatus, ConnectedAccount, ConnectorKey, CountryCode, Currency, CurrencyCode, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentPreparedInsertType, PaymentSelectType, PaymentStatus, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, useFinbricksFetch };
1129
1131
  export type { BankPaymentEvent, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksAccount, FinbricksAccountTransactionsResponse, FinbricksAccountsListResponse, FinbricksAuthTokenResponse, FinbricksBatchBody, FinbricksBatchResponse, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectAccountResponse, FinbricksConnectorConfig, FinbricksEndpoint, FinbricksEndpointPath, FinbricksFetchConfig, FinbricksForeignPaymentBody, FinbricksGetBatchStatusBody, FinbricksGetBatchStatusResponse, FinbricksGetTransactionStatusResponse, FinbricksJWSData, FinbricksPaymentBody, FinbricksPaymentResponse, FinbricksProvider, FinbricksRequestInit, FinbricksTransactionStatus, OneTimeTokenInsertType, OneTimeTokenPatchType, OneTimeTokenSelectType, OneTimeTokenUpdateType };
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.W4h6Dlzi.mjs';
2
- export { M as MockCobsConnector } from './shared/bank.BvXwHpBp.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.DdvSjgls.mjs';
2
+ export { M as MockCobsConnector } from './shared/bank.BcDo3cbz.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.9",
3
+ "version": "0.2.1",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {