@develit-services/bank 4.3.0 → 5.0.0

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 (39) hide show
  1. package/dist/{export/worker.cjs → base.cjs} +27 -27
  2. package/dist/{export/worker.d.ts → base.d.cts} +4 -4
  3. package/dist/{export/worker.d.mts → base.d.mts} +4 -4
  4. package/dist/{export/worker.d.cts → base.d.ts} +4 -4
  5. package/dist/{export/worker.mjs → base.mjs} +4 -4
  6. package/dist/database/schema.d.cts +1 -1
  7. package/dist/database/schema.d.mts +1 -1
  8. package/dist/database/schema.d.ts +1 -1
  9. package/dist/export/workflows.cjs +2 -2
  10. package/dist/export/workflows.mjs +2 -2
  11. package/dist/service.cjs +40 -0
  12. package/dist/service.d.cts +222 -0
  13. package/dist/service.d.mts +222 -0
  14. package/dist/service.d.ts +222 -0
  15. package/dist/service.mjs +37 -0
  16. package/dist/shared/{bank.NjHGMD3j.cjs → bank.BSX82jhx.cjs} +67 -22
  17. package/dist/shared/{bank.DyueVCXo.mjs → bank.BdTj54NO.mjs} +1 -1
  18. package/dist/shared/{bank.CkSgCZ-W.d.cts → bank.C-edstpR.d.cts} +1 -1
  19. package/dist/shared/{bank.tefvLkrJ.d.mts → bank.C6BQDtpF.d.mts} +1 -1
  20. package/dist/shared/{bank.BmDlJzUz.mjs → bank.CZ8MQDPa.mjs} +67 -22
  21. package/dist/shared/{bank.C-XeuTid.cjs → bank.CibQRM2D.cjs} +1 -1
  22. package/dist/shared/{bank.d4sMg6i0.d.cts → bank.Do1KUeDr.d.cts} +1 -1
  23. package/dist/shared/{bank.d4sMg6i0.d.mts → bank.Do1KUeDr.d.mts} +1 -1
  24. package/dist/shared/{bank.d4sMg6i0.d.ts → bank.Do1KUeDr.d.ts} +1 -1
  25. package/dist/shared/{bank.B2FLbr0c.d.ts → bank.pZQAWlIB.d.ts} +1 -1
  26. package/dist/types.cjs +1 -1
  27. package/dist/types.d.cts +4 -5
  28. package/dist/types.d.mts +4 -5
  29. package/dist/types.d.ts +4 -5
  30. package/dist/types.mjs +1 -1
  31. package/package.json +13 -12
  32. package/dist/export/wrangler.cjs +0 -75
  33. package/dist/export/wrangler.d.cts +0 -80
  34. package/dist/export/wrangler.d.mts +0 -80
  35. package/dist/export/wrangler.d.ts +0 -80
  36. package/dist/export/wrangler.mjs +0 -73
  37. package/dist/shared/bank.DyZBd2qL.d.cts +0 -43
  38. package/dist/shared/bank.DyZBd2qL.d.mts +0 -43
  39. package/dist/shared/bank.DyZBd2qL.d.ts +0 -43
@@ -320,12 +320,40 @@ function toBatchedPaymentFromPaymentRequest(sp) {
320
320
  };
321
321
  }
322
322
 
323
+ const MAX_REFERENCE_LENGTH = 30;
324
+ function buildPaymentReference(symbols) {
325
+ const parts = [
326
+ symbols.vs && `VS${symbols.vs}`,
327
+ symbols.ss && `SS${symbols.ss}`,
328
+ symbols.ks && `KS${symbols.ks}`
329
+ ].filter(Boolean);
330
+ return parts.join("").slice(0, MAX_REFERENCE_LENGTH);
331
+ }
332
+
333
+ const SYMBOL_LIMITS = { vs: 10, ss: 10, ks: 4 };
334
+ function assertSymbolLength(symbol, value) {
335
+ const max = SYMBOL_LIMITS[symbol];
336
+ if (value.length > max) {
337
+ throw new Error(
338
+ `buildEndToEndId: ${symbol.toUpperCase()} exceeds SEPA limit (${value.length} > ${max} chars): "${value}"`
339
+ );
340
+ }
341
+ }
323
342
  function buildEndToEndId(payment, options = {}) {
324
343
  const { separator = "/" } = options;
325
344
  const parts = [];
326
- if (payment.vs) parts.push(`VS${payment.vs}`);
327
- if (payment.ss) parts.push(`SS${payment.ss}`);
328
- if (payment.ks) parts.push(`KS${payment.ks}`);
345
+ if (payment.vs) {
346
+ assertSymbolLength("vs", payment.vs);
347
+ parts.push(`VS${payment.vs}`);
348
+ }
349
+ if (payment.ss) {
350
+ assertSymbolLength("ss", payment.ss);
351
+ parts.push(`SS${payment.ss}`);
352
+ }
353
+ if (payment.ks) {
354
+ assertSymbolLength("ks", payment.ks);
355
+ parts.push(`KS${payment.ks}`);
356
+ }
329
357
  if (parts.length === 0) {
330
358
  return payment.id.replace(/-/g, "");
331
359
  }
@@ -486,6 +514,10 @@ const mapFinbricksAccountInsert = ({
486
514
  iban: account.identification.iban
487
515
  });
488
516
 
517
+ const VS_REGEX = /VS[:/\s]*(\d+)/i;
518
+ const SS_REGEX = /SS[:/\s]*(\d+)/i;
519
+ const KS_REGEX = /KS[:/\s]*(\d+)/i;
520
+ const extract = (haystack, regex) => haystack.match(regex)?.[1];
489
521
  const mapReferencesToPayment = (reference) => {
490
522
  const symbols = {
491
523
  vs: void 0,
@@ -493,19 +525,10 @@ const mapReferencesToPayment = (reference) => {
493
525
  ks: void 0
494
526
  };
495
527
  if (!reference) return symbols;
496
- if (Array.isArray(reference) && reference.length > 0) {
497
- symbols.vs = reference.find((ref) => ref.includes("VS")) || void 0;
498
- symbols.ss = reference.find((ref) => ref.includes("SS")) || void 0;
499
- symbols.ks = reference.find((ref) => ref.includes("KS")) || void 0;
500
- }
501
- if (typeof reference === "string") {
502
- const vsMatch = reference.match(/VS[:\s]*(\d+)/i);
503
- const ssMatch = reference.match(/SS[:\s]*(\d+)/i);
504
- const ksMatch = reference.match(/KS[:\s]*(\d+)/i);
505
- if (vsMatch) symbols.vs = vsMatch[1];
506
- if (ssMatch) symbols.ss = ssMatch[1];
507
- if (ksMatch) symbols.ks = ksMatch[1];
508
- }
528
+ const haystack = Array.isArray(reference) ? reference.join(" ") : reference;
529
+ symbols.vs = extract(haystack, VS_REGEX);
530
+ symbols.ss = extract(haystack, SS_REGEX);
531
+ symbols.ks = extract(haystack, KS_REGEX);
509
532
  return symbols;
510
533
  };
511
534
 
@@ -588,8 +611,23 @@ function detectPaymentType(tx, isIncoming) {
588
611
  const mapFinbricksTransactionToPayment = (tx, account) => {
589
612
  const isIncoming = tx.creditDebitIndicator === "CRDT";
590
613
  const related = tx.entryDetails?.transactionDetails?.relatedParties;
591
- const endToEndId = tx.entryDetails.transactionDetails?.references?.endToEndIdentification;
592
- const symbolsRegex = /^\/?VS\d+/;
614
+ const td = tx.entryDetails?.transactionDetails;
615
+ const referenceSources = [
616
+ td?.remittanceInformation?.structured?.creditorReferenceInformation?.reference,
617
+ td?.references?.endToEndIdentification,
618
+ td?.remittanceInformation?.unstructured,
619
+ td?.additionalRemittanceInformation,
620
+ td?.additionalTransactionInformation
621
+ ];
622
+ const symbols = referenceSources.reduce((acc, src) => {
623
+ if (acc.vs && acc.ss && acc.ks) return acc;
624
+ const parsed = mapReferencesToPayment(src);
625
+ return {
626
+ vs: acc.vs ?? parsed.vs,
627
+ ss: acc.ss ?? parsed.ss,
628
+ ks: acc.ks ?? parsed.ks
629
+ };
630
+ }, {});
593
631
  const debtorParsed = parseOtherIdentification(
594
632
  related?.debtorAccount?.identification?.other?.identification
595
633
  );
@@ -606,11 +644,9 @@ const mapFinbricksTransactionToPayment = (tx, account) => {
606
644
  currency: tx.amount?.currency || "CZK",
607
645
  paymentType: detectPaymentType(tx, isIncoming),
608
646
  status: mapFinbricksStatus(tx.status, !!tx.bookingDate?.date),
609
- message: tx.entryDetails.transactionDetails?.remittanceInformation?.unstructured || tx.entryDetails.transactionDetails?.additionalRemittanceInformation || tx.entryDetails.transactionDetails?.additionalTransactionInformation || null,
647
+ message: td?.remittanceInformation?.unstructured || td?.additionalRemittanceInformation || td?.additionalTransactionInformation || null,
610
648
  processedAt: new Date(tx.bookingDate.date),
611
- ...mapReferencesToPayment(
612
- tx.entryDetails.transactionDetails?.remittanceInformation?.structured?.creditorReferenceInformation?.reference || (endToEndId && symbolsRegex.test(endToEndId) ? endToEndId : void 0)
613
- ),
649
+ ...symbols,
614
650
  creditor: {
615
651
  holderName: related?.creditorAccount?.name || related?.creditor?.name || "Unknown",
616
652
  iban: isIncoming ? account.iban || void 0 : related?.creditorAccount?.identification?.iban || creditorParsed.iban || void 0,
@@ -933,6 +969,12 @@ class FinbricksConnector extends IBankConnector {
933
969
  const creditorAgent = creditorIdentification.type === "BBAN" && creditorBic ? {
934
970
  financialInstitutionIdentification: { bic: creditorBic }
935
971
  } : void 0;
972
+ const reference = buildPaymentReference({
973
+ vs: payment.vs,
974
+ ss: payment.ss,
975
+ ks: payment.ks
976
+ });
977
+ const unstructured = [reference, payment.message?.trim()].filter(Boolean).join(" ").slice(0, 140) || void 0;
936
978
  const bankRefId = uuidv4();
937
979
  const [response, error] = await useResult(
938
980
  this.finbricks.request({
@@ -962,6 +1004,7 @@ class FinbricksConnector extends IBankConnector {
962
1004
  ...creditorAddress && { postalAddress: creditorAddress }
963
1005
  },
964
1006
  ...creditorAgent && { creditorAgent },
1007
+ ...unstructured && { remittanceInformation: { unstructured } },
965
1008
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`
966
1009
  }
967
1010
  })
@@ -1063,6 +1106,8 @@ class FinbricksConnector extends IBankConnector {
1063
1106
  creditorName: payment.creditor.holderName,
1064
1107
  description: payment.message,
1065
1108
  variableSymbol: payment.vs ?? (payment.ss ? void 0 : autoVariableSymbol(payment.id)),
1109
+ specificSymbol: payment.ss,
1110
+ constantSymbol: payment.ks,
1066
1111
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`,
1067
1112
  paymentProvider: this.PROVIDER
1068
1113
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const drizzleOrm = require('drizzle-orm');
4
- const ott_zod = require('./bank.NjHGMD3j.cjs');
4
+ const ott_zod = require('./bank.BSX82jhx.cjs');
5
5
  const backendSdk = require('@develit-io/backend-sdk');
6
6
  require('./bank.9Yw4KHyl.cjs');
7
7
  require('date-fns');
@@ -3526,4 +3526,4 @@ type ParsedBankPayment = {
3526
3526
  type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
3527
3527
 
3528
3528
  export { IBankConnector as I, BASE_TERMINAL_STATUSES as M, BATCH_MODES as N, BATCH_STATUSES as O, CHARGE_BEARERS as X, CONNECTOR_KEYS as Y, COUNTRY_CODES as Z, CREDENTIALS_TYPES as _, INSTRUCTION_PRIORITIES as a3, PAYMENT_DIRECTIONS as a5, PAYMENT_REQUEST_STATUSES as a6, PAYMENT_STATUSES as a7, PAYMENT_TYPES as a8, isTerminalStatus as aA, account as aB, accountCredentials as aC, batch as aD, ott as aE, payment as aF, paymentRequest as aG, TOKEN_TYPES as ai, accountCredentialsInsertSchema as ak, accountCredentialsSelectSchema as al, accountCredentialsUpdateSchema as am, accountInsertSchema as an, accountSelectSchema as ao, accountUpdateSchema as ap, hasPaymentAccountAssigned as aq, isBatchAuthorized as ar, isBatchCompleted as as, isBatchFailed as at, isBatchInitiated as au, isBatchProcessing as av, isBatchReadyToSign as aw, isPaymentCompleted as ax, isPendingStatus as ay, isProcessedStatus as az, tables as t, ACCOUNT_STATUSES as y };
3529
- export type { ChargeBearer as $, AccountSelectType as A, BatchSelectType as B, ConnectorConfig as C, AccountCredentialsSelectType as D, AccountCredentialsUpdateType as E, AccountPatchType as F, AccountStatus as G, HandleAuthorizationCallbackInput as H, AccountUpdateType as J, AuthorizedBatch as K, LastSyncMetadata as L, PaymentRequestSelectType as P, BankAccountWithLastSync as Q, BankCode as R, BatchInsertType as S, BatchLifecycle as T, BatchMode as U, BatchPayment as V, BatchStatus as W, PaymentSelectType as a, CompletedBatch as a0, CountryCode as a1, CredentialsType as a2, InstructionPriority as a4, PaymentDirection as a9, PaymentFailedInsertType as aa, PaymentInsertType as ab, PaymentLifecycle as ac, PaymentPreparedInsertType as ad, PaymentStatus as ae, ProcessingBatch as af, ReadyToSignBatch as ag, ResolvedCredentials as ah, TokenType as aj, ConfigEnvironmentBank as b, ConnectorKey as c, PaymentType as d, CurrencyCode as e, HandleAuthorizationCallbackOutput as f, ConnectedAccount as g, CredentialsResolver as h, AccountCredentialsInsertType as i, AccountInsertType as j, BatchedPayment as k, InitiatedBatch as l, IncomingPayment as m, InitiatedPayment as n, ParsedBankPayment as o, PaymentRequestStatus as p, AuthorizationCallbackResult as q, BatchMetadata as r, Currency as s, AccountAssignedPayment as u, PreparedPayment as v, CompletedPayment as w, PaymentRequestInsertType as x, AccountCredentialsPatchType as z };
3529
+ export type { ChargeBearer as $, AccountSelectType as A, BatchSelectType as B, ConnectorConfig as C, AccountCredentialsSelectType as D, AccountCredentialsUpdateType as E, AccountPatchType as F, AccountStatus as G, HandleAuthorizationCallbackInput as H, AccountUpdateType as J, AuthorizedBatch as K, LastSyncMetadata as L, PaymentRequestSelectType as P, BankAccountWithLastSync as Q, BankCode as R, BatchInsertType as S, BatchLifecycle as T, BatchMode as U, BatchPayment as V, BatchStatus as W, PaymentSelectType as a, CompletedBatch as a0, CountryCode as a1, CredentialsType as a2, InstructionPriority as a4, PaymentDirection as a9, PaymentFailedInsertType as aa, PaymentInsertType as ab, PaymentLifecycle as ac, PaymentPreparedInsertType as ad, PaymentStatus as ae, ProcessingBatch as af, ReadyToSignBatch as ag, ResolvedCredentials as ah, TokenType as aj, ConnectorKey as b, ConfigEnvironmentBank as c, PaymentType as d, CurrencyCode as e, HandleAuthorizationCallbackOutput as f, ConnectedAccount as g, CredentialsResolver as h, AccountCredentialsInsertType as i, AccountInsertType as j, BatchedPayment as k, InitiatedBatch as l, IncomingPayment as m, InitiatedPayment as n, ParsedBankPayment as o, PaymentRequestStatus as p, AuthorizationCallbackResult as q, BatchMetadata as r, Currency as s, AccountAssignedPayment as u, PreparedPayment as v, CompletedPayment as w, PaymentRequestInsertType as x, AccountCredentialsPatchType as z };
@@ -3526,4 +3526,4 @@ type ParsedBankPayment = {
3526
3526
  type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
3527
3527
 
3528
3528
  export { IBankConnector as I, BASE_TERMINAL_STATUSES as M, BATCH_MODES as N, BATCH_STATUSES as O, CHARGE_BEARERS as X, CONNECTOR_KEYS as Y, COUNTRY_CODES as Z, CREDENTIALS_TYPES as _, INSTRUCTION_PRIORITIES as a3, PAYMENT_DIRECTIONS as a5, PAYMENT_REQUEST_STATUSES as a6, PAYMENT_STATUSES as a7, PAYMENT_TYPES as a8, isTerminalStatus as aA, account as aB, accountCredentials as aC, batch as aD, ott as aE, payment as aF, paymentRequest as aG, TOKEN_TYPES as ai, accountCredentialsInsertSchema as ak, accountCredentialsSelectSchema as al, accountCredentialsUpdateSchema as am, accountInsertSchema as an, accountSelectSchema as ao, accountUpdateSchema as ap, hasPaymentAccountAssigned as aq, isBatchAuthorized as ar, isBatchCompleted as as, isBatchFailed as at, isBatchInitiated as au, isBatchProcessing as av, isBatchReadyToSign as aw, isPaymentCompleted as ax, isPendingStatus as ay, isProcessedStatus as az, tables as t, ACCOUNT_STATUSES as y };
3529
- export type { ChargeBearer as $, AccountSelectType as A, BatchSelectType as B, ConnectorConfig as C, AccountCredentialsSelectType as D, AccountCredentialsUpdateType as E, AccountPatchType as F, AccountStatus as G, HandleAuthorizationCallbackInput as H, AccountUpdateType as J, AuthorizedBatch as K, LastSyncMetadata as L, PaymentRequestSelectType as P, BankAccountWithLastSync as Q, BankCode as R, BatchInsertType as S, BatchLifecycle as T, BatchMode as U, BatchPayment as V, BatchStatus as W, PaymentSelectType as a, CompletedBatch as a0, CountryCode as a1, CredentialsType as a2, InstructionPriority as a4, PaymentDirection as a9, PaymentFailedInsertType as aa, PaymentInsertType as ab, PaymentLifecycle as ac, PaymentPreparedInsertType as ad, PaymentStatus as ae, ProcessingBatch as af, ReadyToSignBatch as ag, ResolvedCredentials as ah, TokenType as aj, ConfigEnvironmentBank as b, ConnectorKey as c, PaymentType as d, CurrencyCode as e, HandleAuthorizationCallbackOutput as f, ConnectedAccount as g, CredentialsResolver as h, AccountCredentialsInsertType as i, AccountInsertType as j, BatchedPayment as k, InitiatedBatch as l, IncomingPayment as m, InitiatedPayment as n, ParsedBankPayment as o, PaymentRequestStatus as p, AuthorizationCallbackResult as q, BatchMetadata as r, Currency as s, AccountAssignedPayment as u, PreparedPayment as v, CompletedPayment as w, PaymentRequestInsertType as x, AccountCredentialsPatchType as z };
3529
+ export type { ChargeBearer as $, AccountSelectType as A, BatchSelectType as B, ConnectorConfig as C, AccountCredentialsSelectType as D, AccountCredentialsUpdateType as E, AccountPatchType as F, AccountStatus as G, HandleAuthorizationCallbackInput as H, AccountUpdateType as J, AuthorizedBatch as K, LastSyncMetadata as L, PaymentRequestSelectType as P, BankAccountWithLastSync as Q, BankCode as R, BatchInsertType as S, BatchLifecycle as T, BatchMode as U, BatchPayment as V, BatchStatus as W, PaymentSelectType as a, CompletedBatch as a0, CountryCode as a1, CredentialsType as a2, InstructionPriority as a4, PaymentDirection as a9, PaymentFailedInsertType as aa, PaymentInsertType as ab, PaymentLifecycle as ac, PaymentPreparedInsertType as ad, PaymentStatus as ae, ProcessingBatch as af, ReadyToSignBatch as ag, ResolvedCredentials as ah, TokenType as aj, ConnectorKey as b, ConfigEnvironmentBank as c, PaymentType as d, CurrencyCode as e, HandleAuthorizationCallbackOutput as f, ConnectedAccount as g, CredentialsResolver as h, AccountCredentialsInsertType as i, AccountInsertType as j, BatchedPayment as k, InitiatedBatch as l, IncomingPayment as m, InitiatedPayment as n, ParsedBankPayment as o, PaymentRequestStatus as p, AuthorizationCallbackResult as q, BatchMetadata as r, Currency as s, AccountAssignedPayment as u, PreparedPayment as v, CompletedPayment as w, PaymentRequestInsertType as x, AccountCredentialsPatchType as z };
@@ -3526,4 +3526,4 @@ type ParsedBankPayment = {
3526
3526
  type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
3527
3527
 
3528
3528
  export { IBankConnector as I, BASE_TERMINAL_STATUSES as M, BATCH_MODES as N, BATCH_STATUSES as O, CHARGE_BEARERS as X, CONNECTOR_KEYS as Y, COUNTRY_CODES as Z, CREDENTIALS_TYPES as _, INSTRUCTION_PRIORITIES as a3, PAYMENT_DIRECTIONS as a5, PAYMENT_REQUEST_STATUSES as a6, PAYMENT_STATUSES as a7, PAYMENT_TYPES as a8, isTerminalStatus as aA, account as aB, accountCredentials as aC, batch as aD, ott as aE, payment as aF, paymentRequest as aG, TOKEN_TYPES as ai, accountCredentialsInsertSchema as ak, accountCredentialsSelectSchema as al, accountCredentialsUpdateSchema as am, accountInsertSchema as an, accountSelectSchema as ao, accountUpdateSchema as ap, hasPaymentAccountAssigned as aq, isBatchAuthorized as ar, isBatchCompleted as as, isBatchFailed as at, isBatchInitiated as au, isBatchProcessing as av, isBatchReadyToSign as aw, isPaymentCompleted as ax, isPendingStatus as ay, isProcessedStatus as az, tables as t, ACCOUNT_STATUSES as y };
3529
- export type { ChargeBearer as $, AccountSelectType as A, BatchSelectType as B, ConnectorConfig as C, AccountCredentialsSelectType as D, AccountCredentialsUpdateType as E, AccountPatchType as F, AccountStatus as G, HandleAuthorizationCallbackInput as H, AccountUpdateType as J, AuthorizedBatch as K, LastSyncMetadata as L, PaymentRequestSelectType as P, BankAccountWithLastSync as Q, BankCode as R, BatchInsertType as S, BatchLifecycle as T, BatchMode as U, BatchPayment as V, BatchStatus as W, PaymentSelectType as a, CompletedBatch as a0, CountryCode as a1, CredentialsType as a2, InstructionPriority as a4, PaymentDirection as a9, PaymentFailedInsertType as aa, PaymentInsertType as ab, PaymentLifecycle as ac, PaymentPreparedInsertType as ad, PaymentStatus as ae, ProcessingBatch as af, ReadyToSignBatch as ag, ResolvedCredentials as ah, TokenType as aj, ConfigEnvironmentBank as b, ConnectorKey as c, PaymentType as d, CurrencyCode as e, HandleAuthorizationCallbackOutput as f, ConnectedAccount as g, CredentialsResolver as h, AccountCredentialsInsertType as i, AccountInsertType as j, BatchedPayment as k, InitiatedBatch as l, IncomingPayment as m, InitiatedPayment as n, ParsedBankPayment as o, PaymentRequestStatus as p, AuthorizationCallbackResult as q, BatchMetadata as r, Currency as s, AccountAssignedPayment as u, PreparedPayment as v, CompletedPayment as w, PaymentRequestInsertType as x, AccountCredentialsPatchType as z };
3529
+ export type { ChargeBearer as $, AccountSelectType as A, BatchSelectType as B, ConnectorConfig as C, AccountCredentialsSelectType as D, AccountCredentialsUpdateType as E, AccountPatchType as F, AccountStatus as G, HandleAuthorizationCallbackInput as H, AccountUpdateType as J, AuthorizedBatch as K, LastSyncMetadata as L, PaymentRequestSelectType as P, BankAccountWithLastSync as Q, BankCode as R, BatchInsertType as S, BatchLifecycle as T, BatchMode as U, BatchPayment as V, BatchStatus as W, PaymentSelectType as a, CompletedBatch as a0, CountryCode as a1, CredentialsType as a2, InstructionPriority as a4, PaymentDirection as a9, PaymentFailedInsertType as aa, PaymentInsertType as ab, PaymentLifecycle as ac, PaymentPreparedInsertType as ad, PaymentStatus as ae, ProcessingBatch as af, ReadyToSignBatch as ag, ResolvedCredentials as ah, TokenType as aj, ConnectorKey as b, ConfigEnvironmentBank as c, PaymentType as d, CurrencyCode as e, HandleAuthorizationCallbackOutput as f, ConnectedAccount as g, CredentialsResolver as h, AccountCredentialsInsertType as i, AccountInsertType as j, BatchedPayment as k, InitiatedBatch as l, IncomingPayment as m, InitiatedPayment as n, ParsedBankPayment as o, PaymentRequestStatus as p, AuthorizationCallbackResult as q, BatchMetadata as r, Currency as s, AccountAssignedPayment as u, PreparedPayment as v, CompletedPayment as w, PaymentRequestInsertType as x, AccountCredentialsPatchType as z };
@@ -1,4 +1,4 @@
1
- import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.d4sMg6i0.js';
1
+ import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.Do1KUeDr.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
package/dist/types.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const ott_zod = require('./shared/bank.NjHGMD3j.cjs');
3
+ const ott_zod = require('./shared/bank.BSX82jhx.cjs');
4
4
  const database_schema = require('./shared/bank.9Yw4KHyl.cjs');
5
5
  const batchLifecycle = require('./shared/bank.NF8bZBy0.cjs');
6
6
  const generalCodes = require('@develit-io/general-codes');
package/dist/types.d.cts CHANGED
@@ -1,9 +1,8 @@
1
- import { I as IBankConnector, c as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.d4sMg6i0.cjs';
2
- export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, b as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.d4sMg6i0.cjs';
3
- import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.CkSgCZ-W.cjs';
4
- export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.CkSgCZ-W.cjs';
1
+ import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.Do1KUeDr.cjs';
2
+ export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.Do1KUeDr.cjs';
3
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.C-edstpR.cjs';
4
+ export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.C-edstpR.cjs';
5
5
  import { z } from 'zod';
6
- export { a as BankServiceEnv, B as BankServiceWranglerConfig } from './shared/bank.DyZBd2qL.cjs';
7
6
  import { BaseEvent } from '@develit-io/backend-sdk';
8
7
  import * as drizzle_orm_zod from 'drizzle-orm/zod';
9
8
  import * as drizzle_orm from 'drizzle-orm';
package/dist/types.d.mts CHANGED
@@ -1,9 +1,8 @@
1
- import { I as IBankConnector, c as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.d4sMg6i0.mjs';
2
- export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, b as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.d4sMg6i0.mjs';
3
- import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.tefvLkrJ.mjs';
4
- export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.tefvLkrJ.mjs';
1
+ import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.Do1KUeDr.mjs';
2
+ export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.Do1KUeDr.mjs';
3
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.C6BQDtpF.mjs';
4
+ export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.C6BQDtpF.mjs';
5
5
  import { z } from 'zod';
6
- export { a as BankServiceEnv, B as BankServiceWranglerConfig } from './shared/bank.DyZBd2qL.mjs';
7
6
  import { BaseEvent } from '@develit-io/backend-sdk';
8
7
  import * as drizzle_orm_zod from 'drizzle-orm/zod';
9
8
  import * as drizzle_orm from 'drizzle-orm';
package/dist/types.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- import { I as IBankConnector, c as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.d4sMg6i0.js';
2
- export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, b as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.d4sMg6i0.js';
3
- import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.B2FLbr0c.js';
4
- export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.B2FLbr0c.js';
1
+ import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.Do1KUeDr.js';
2
+ export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.Do1KUeDr.js';
3
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.pZQAWlIB.js';
4
+ export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.pZQAWlIB.js';
5
5
  import { z } from 'zod';
6
- export { a as BankServiceEnv, B as BankServiceWranglerConfig } from './shared/bank.DyZBd2qL.js';
7
6
  import { BaseEvent } from '@develit-io/backend-sdk';
8
7
  import * as drizzle_orm_zod from 'drizzle-orm/zod';
9
8
  import * as drizzle_orm from 'drizzle-orm';
package/dist/types.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { B as BASE_TERMINAL_STATUSES, C as CsobConnector, D as DbuConnector, E as ErsteConnector, F as FINBRICKS_ENDPOINTS, a as FinbricksClient, b as FinbricksConnector, I as IBankConnector, K as KBConnector, M as MockCobsConnector, c as MockConnector, d as accountCredentialsInsertSchema, e as accountCredentialsSelectSchema, f as accountCredentialsUpdateSchema, g as accountInsertSchema, h as accountSelectSchema, i as accountUpdateSchema, j as assignAccount, k as dbuAccountConfigSchema, l as hasPaymentAccountAssigned, m as isPaymentCompleted, n as isPendingStatus, o as isProcessedStatus, p as isTerminalStatus, q as ottInsertSchema, r as ottSelectSchema, s as ottUpdateSchema, t as signFinbricksJws, u as toBatchedPayment, v as toBatchedPaymentFromPaymentRequest, w as toCompletedPayment, x as toIncomingPayment, y as toPaymentRequestInsert, z as toPreparedPayment, A as useFinbricksFetch } from './shared/bank.BmDlJzUz.mjs';
1
+ export { B as BASE_TERMINAL_STATUSES, C as CsobConnector, D as DbuConnector, E as ErsteConnector, F as FINBRICKS_ENDPOINTS, a as FinbricksClient, b as FinbricksConnector, I as IBankConnector, K as KBConnector, M as MockCobsConnector, c as MockConnector, d as accountCredentialsInsertSchema, e as accountCredentialsSelectSchema, f as accountCredentialsUpdateSchema, g as accountInsertSchema, h as accountSelectSchema, i as accountUpdateSchema, j as assignAccount, k as dbuAccountConfigSchema, l as hasPaymentAccountAssigned, m as isPaymentCompleted, n as isPendingStatus, o as isProcessedStatus, p as isTerminalStatus, q as ottInsertSchema, r as ottSelectSchema, s as ottUpdateSchema, t as signFinbricksJws, u as toBatchedPayment, v as toBatchedPaymentFromPaymentRequest, w as toCompletedPayment, x as toIncomingPayment, y as toPaymentRequestInsert, z as toPreparedPayment, A as useFinbricksFetch } from './shared/bank.CZ8MQDPa.mjs';
2
2
  export { A as ACCOUNT_STATUSES, B as BATCH_MODES, a as BATCH_STATUES, a as BATCH_STATUSES, C as CHARGE_BEARERS, b as CONNECTOR_KEYS, c as COUNTRY_CODES, d as CREDENTIALS_TYPES, I as INSTRUCTION_PRIORITIES, P as PAYMENT_DIRECTIONS, e as PAYMENT_REQUEST_STATUSES, f as PAYMENT_STATUSES, g as PAYMENT_TYPES, T as TOKEN_TYPES } from './shared/bank.BzDNLxB_.mjs';
3
3
  export { i as isBatchAuthorized, a as isBatchCompleted, b as isBatchFailed, c as isBatchInitiated, d as isBatchProcessing, e as isBatchReadyToSign } from './shared/bank.XqSw509X.mjs';
4
4
  export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
package/package.json CHANGED
@@ -1,18 +1,13 @@
1
1
  {
2
2
  "name": "@develit-services/bank",
3
- "version": "4.3.0",
3
+ "version": "5.0.0",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {
7
- "./wrangler": {
8
- "types": "./dist/export/wrangler.d.ts",
9
- "import": "./dist/export/wrangler.mjs",
10
- "require": "./dist/export/wrangler.cjs"
11
- },
12
- "./worker": {
13
- "types": "./dist/export/worker.d.ts",
14
- "import": "./dist/export/worker.mjs",
15
- "require": "./dist/export/worker.cjs"
7
+ "./base": {
8
+ "types": "./dist/base.d.ts",
9
+ "import": "./dist/base.mjs",
10
+ "require": "./dist/base.cjs"
16
11
  },
17
12
  "./workflows": {
18
13
  "types": "./dist/export/workflows.d.ts",
@@ -29,7 +24,12 @@
29
24
  "import": "./dist/types.mjs",
30
25
  "require": "./dist/types.cjs"
31
26
  },
32
- "./package.json": "./package.json"
27
+ "./package.json": "./package.json",
28
+ "./service": {
29
+ "types": "./dist/service.d.ts",
30
+ "import": "./dist/service.mjs",
31
+ "require": "./dist/service.cjs"
32
+ }
33
33
  },
34
34
  "files": [
35
35
  "./dist"
@@ -60,6 +60,7 @@
60
60
  "@develit-io/backend-sdk": "^11.0.2",
61
61
  "@develit-io/general-codes": "^1.19.0",
62
62
  "drizzle-orm": "^1.0.0-rc.1",
63
- "zod": "^4.1.13"
63
+ "zod": "^4.1.13",
64
+ "@develit-io/platform-sdk": "^4.1.1"
64
65
  }
65
66
  }
@@ -1,75 +0,0 @@
1
- 'use strict';
2
-
3
- const backendSdk = require('@develit-io/backend-sdk');
4
-
5
- function defineBankServiceWrangler(config) {
6
- const { project, name, vars, d1, triggers, kv, queues } = config;
7
- const base = {
8
- ...backendSdk.composeWranglerBase({
9
- project,
10
- name
11
- }),
12
- vars: {
13
- ENVIRONMENT: "localhost",
14
- ...vars
15
- },
16
- services: [
17
- {
18
- binding: "SECRETS_STORE",
19
- service: `${project}-secrets-store`
20
- }
21
- ],
22
- triggers,
23
- kv_namespaces: [
24
- {
25
- binding: "BANK_KV",
26
- id: kv.id
27
- }
28
- ],
29
- d1_databases: [
30
- {
31
- binding: "BANK_D1",
32
- database_name: `${project}-bank`,
33
- database_id: d1.id,
34
- migrations_dir: "./src/database/migrations"
35
- }
36
- ],
37
- workflows: [
38
- {
39
- name: `${project}-bank-sync-account-payments`,
40
- binding: "SYNC_ACCOUNT_PAYMENTS_WORKFLOW",
41
- class_name: "BankSyncAccountPayments",
42
- limits: {
43
- steps: 25e3
44
- }
45
- },
46
- {
47
- name: `${project}-bank-process-batch`,
48
- binding: "PROCESS_BATCH_WORKFLOW",
49
- class_name: "BankProcessBatch"
50
- }
51
- ],
52
- vpc_services: [
53
- {
54
- binding: "DBU_CBS_BACKOFFICE_DEV",
55
- service_id: "019c2962-172c-75a2-a000-b76e246d25d7",
56
- remote: true
57
- }
58
- ],
59
- queues: {
60
- producers: [
61
- {
62
- binding: queues.producers.bus.binding,
63
- queue: `${project}-${queues.producers.bus.queue}`
64
- },
65
- {
66
- binding: "NOTIFICATIONS_QUEUE",
67
- queue: `${project}-notifications`
68
- }
69
- ]
70
- }
71
- };
72
- return base;
73
- }
74
-
75
- exports.defineBankServiceWrangler = defineBankServiceWrangler;
@@ -1,80 +0,0 @@
1
- import { B as BankServiceWranglerConfig } from '../shared/bank.DyZBd2qL.cjs';
2
-
3
- declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
4
- vars: {
5
- VERSION: string;
6
- ERSTE_AUTH_URI: "https://webapi.developers.erstegroup.com/api/csas/sandbox/v1/sandbox-idp";
7
- ERSTE_PAYMENTS_URI: "https://webapi.developers.erstegroup.com/api/csas/public/sandbox/v1/payments";
8
- ERSTE_ACCOUNTS_URI: "https://webapi.developers.erstegroup.com/api/csas/public/sandbox/v3/accounts";
9
- FINBRICKS_BASE_URI: "https://api.sandbox.finbricks.com";
10
- FINBRICKS_MERCHANT_ID: string;
11
- CRON_PAYMENT_STATUSES: string;
12
- CRON_SYNC_WORKFLOW_HEARTBEAT: string;
13
- BANK_AUTH_RECIPIENT: string;
14
- DBUCS_BASE_URI: string;
15
- DBUCS_USERNAME: string;
16
- DBUCS_APPLICATION_CODE: string;
17
- DBUCS_TX_AUTH_URI: string;
18
- REDIRECT_URI: string;
19
- SYNC_WORKFLOW_RESET_AFTER_ITERATIONS: string;
20
- ENVIRONMENT: string;
21
- };
22
- services: {
23
- binding: string;
24
- service: string;
25
- }[];
26
- triggers: {
27
- crons: string[];
28
- };
29
- kv_namespaces: {
30
- binding: string;
31
- id: string;
32
- }[];
33
- d1_databases: {
34
- binding: string;
35
- database_name: string;
36
- database_id: string;
37
- migrations_dir: string;
38
- }[];
39
- workflows: ({
40
- name: string;
41
- binding: string;
42
- class_name: string;
43
- limits: {
44
- steps: number;
45
- };
46
- } | {
47
- name: string;
48
- binding: string;
49
- class_name: string;
50
- limits?: undefined;
51
- })[];
52
- vpc_services: {
53
- binding: string;
54
- service_id: string;
55
- remote: boolean;
56
- }[];
57
- queues: {
58
- producers: {
59
- binding: string;
60
- queue: string;
61
- }[];
62
- };
63
- $schema: string;
64
- name: string;
65
- main: string;
66
- compatibility_date: string;
67
- compatibility_flags: string[];
68
- observability: {
69
- enabled: boolean;
70
- head_sampling_rate: number;
71
- logs: {
72
- enabled: boolean;
73
- invocation_logs: boolean;
74
- };
75
- };
76
- workers_dev: boolean;
77
- keep_vars: boolean;
78
- };
79
-
80
- export { defineBankServiceWrangler };
@@ -1,80 +0,0 @@
1
- import { B as BankServiceWranglerConfig } from '../shared/bank.DyZBd2qL.mjs';
2
-
3
- declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
4
- vars: {
5
- VERSION: string;
6
- ERSTE_AUTH_URI: "https://webapi.developers.erstegroup.com/api/csas/sandbox/v1/sandbox-idp";
7
- ERSTE_PAYMENTS_URI: "https://webapi.developers.erstegroup.com/api/csas/public/sandbox/v1/payments";
8
- ERSTE_ACCOUNTS_URI: "https://webapi.developers.erstegroup.com/api/csas/public/sandbox/v3/accounts";
9
- FINBRICKS_BASE_URI: "https://api.sandbox.finbricks.com";
10
- FINBRICKS_MERCHANT_ID: string;
11
- CRON_PAYMENT_STATUSES: string;
12
- CRON_SYNC_WORKFLOW_HEARTBEAT: string;
13
- BANK_AUTH_RECIPIENT: string;
14
- DBUCS_BASE_URI: string;
15
- DBUCS_USERNAME: string;
16
- DBUCS_APPLICATION_CODE: string;
17
- DBUCS_TX_AUTH_URI: string;
18
- REDIRECT_URI: string;
19
- SYNC_WORKFLOW_RESET_AFTER_ITERATIONS: string;
20
- ENVIRONMENT: string;
21
- };
22
- services: {
23
- binding: string;
24
- service: string;
25
- }[];
26
- triggers: {
27
- crons: string[];
28
- };
29
- kv_namespaces: {
30
- binding: string;
31
- id: string;
32
- }[];
33
- d1_databases: {
34
- binding: string;
35
- database_name: string;
36
- database_id: string;
37
- migrations_dir: string;
38
- }[];
39
- workflows: ({
40
- name: string;
41
- binding: string;
42
- class_name: string;
43
- limits: {
44
- steps: number;
45
- };
46
- } | {
47
- name: string;
48
- binding: string;
49
- class_name: string;
50
- limits?: undefined;
51
- })[];
52
- vpc_services: {
53
- binding: string;
54
- service_id: string;
55
- remote: boolean;
56
- }[];
57
- queues: {
58
- producers: {
59
- binding: string;
60
- queue: string;
61
- }[];
62
- };
63
- $schema: string;
64
- name: string;
65
- main: string;
66
- compatibility_date: string;
67
- compatibility_flags: string[];
68
- observability: {
69
- enabled: boolean;
70
- head_sampling_rate: number;
71
- logs: {
72
- enabled: boolean;
73
- invocation_logs: boolean;
74
- };
75
- };
76
- workers_dev: boolean;
77
- keep_vars: boolean;
78
- };
79
-
80
- export { defineBankServiceWrangler };