@develit-services/bank 4.1.0 → 4.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 (32) hide show
  1. package/dist/database/schema.d.cts +1 -1
  2. package/dist/database/schema.d.mts +1 -1
  3. package/dist/database/schema.d.ts +1 -1
  4. package/dist/export/worker.cjs +217 -17
  5. package/dist/export/worker.d.cts +3 -2
  6. package/dist/export/worker.d.mts +3 -2
  7. package/dist/export/worker.d.ts +3 -2
  8. package/dist/export/worker.mjs +217 -17
  9. package/dist/export/workflows.cjs +102 -87
  10. package/dist/export/workflows.mjs +102 -87
  11. package/dist/export/wrangler.d.cts +2 -1
  12. package/dist/export/wrangler.d.mts +2 -1
  13. package/dist/export/wrangler.d.ts +2 -1
  14. package/dist/shared/{bank.C0JeMUxQ.d.cts → bank.BCqBwSKC.d.cts} +22 -3
  15. package/dist/shared/{bank.C0JeMUxQ.d.mts → bank.BCqBwSKC.d.mts} +22 -3
  16. package/dist/shared/{bank.C0JeMUxQ.d.ts → bank.BCqBwSKC.d.ts} +22 -3
  17. package/dist/shared/{bank.BScD3GXI.mjs → bank.BELDXSDV.mjs} +1 -1
  18. package/dist/shared/{bank.BxZARqNE.mjs → bank.BOMobxtA.mjs} +45 -18
  19. package/dist/shared/{bank.DflRiCrT.d.ts → bank.BmX_IG66.d.ts} +1 -1
  20. package/dist/shared/{bank.CjPpPiJF.d.mts → bank.BnCJmT6k.d.mts} +1 -1
  21. package/dist/shared/{bank.DNFep60v.cjs → bank.CioJeFzf.cjs} +1 -1
  22. package/dist/shared/{bank.xrNekjj9.cjs → bank.DiJmJkDt.cjs} +44 -16
  23. package/dist/shared/{bank.BydmpvCs.d.ts → bank.Dq24vYU7.d.cts} +1 -0
  24. package/dist/shared/{bank.BydmpvCs.d.cts → bank.Dq24vYU7.d.mts} +1 -0
  25. package/dist/shared/{bank.BydmpvCs.d.mts → bank.Dq24vYU7.d.ts} +1 -0
  26. package/dist/shared/{bank.CwB3cDIG.d.cts → bank.mHFTrKBv.d.cts} +1 -1
  27. package/dist/types.cjs +2 -1
  28. package/dist/types.d.cts +5 -5
  29. package/dist/types.d.mts +5 -5
  30. package/dist/types.d.ts +5 -5
  31. package/dist/types.mjs +1 -1
  32. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  import { first, uuidv4, asNonEmpty } from '@develit-io/backend-sdk';
2
- import { B as tables, G as relations, v as toBatchedPaymentFromPaymentRequest, z as toPreparedPayment, H as initiateConnector, m as isPaymentCompleted } from '../shared/bank.BxZARqNE.mjs';
2
+ import { G as tables, H as relations, v as toBatchedPaymentFromPaymentRequest, z as toPreparedPayment, J as initiateConnector, m as isPaymentCompleted } from '../shared/bank.BOMobxtA.mjs';
3
3
  import { i as isBatchAuthorized, b as isBatchFailed, d as isBatchProcessing } from '../shared/bank.XqSw509X.mjs';
4
4
  import { eq, and, inArray } from 'drizzle-orm';
5
- import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.BScD3GXI.mjs';
5
+ import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.BELDXSDV.mjs';
6
6
  import { WorkflowEntrypoint } from 'cloudflare:workers';
7
7
  import { NonRetryableError } from 'cloudflare:workflows';
8
8
  import { drizzle } from 'drizzle-orm/d1';
@@ -303,6 +303,10 @@ function createWorkflowLogger(instanceId) {
303
303
  };
304
304
  }
305
305
 
306
+ function getStepCount(ctx) {
307
+ return ctx.step?.count ?? 0;
308
+ }
309
+
306
310
  async function pushToQueue(queue, message) {
307
311
  if (!Array.isArray(message)) {
308
312
  await queue.send(message, { contentType: "v8" });
@@ -323,6 +327,10 @@ class BankSyncAccountPayments extends WorkflowEntrypoint {
323
327
  if (!accountId) {
324
328
  throw new NonRetryableError(`Haven't obtained accountId to load.`);
325
329
  }
330
+ const workflowStartedAt = await step.do(
331
+ "capture workflow start time",
332
+ async () => Date.now()
333
+ );
326
334
  while (true) {
327
335
  const now = /* @__PURE__ */ new Date();
328
336
  const account = await step.do("load account", async () => {
@@ -388,99 +396,106 @@ class BankSyncAccountPayments extends WorkflowEntrypoint {
388
396
  const paymentsToProcess = payments.filter(
389
397
  (p) => isPaymentCompleted(p.parsed)
390
398
  );
391
- if (paymentsToProcess.length) {
392
- const lastSyncBankRefIds = account.lastSyncMetadata?.lastSyncBankRefIds || [];
393
- const paymentsToInsert = paymentsToProcess.filter(
394
- (p) => !lastSyncBankRefIds.includes(p.parsed.bankRefId)
395
- );
396
- await step.do(
397
- "process new payments and update lastSyncAt",
398
- async () => {
399
- const eventsToEmit = [];
400
- const bankRefIds = paymentsToInsert.map((p) => p.parsed.bankRefId).filter((id) => id != null);
401
- const matchingRequests = bankRefIds.length > 0 ? await db.select().from(tables.paymentRequest).where(
399
+ const lastSyncBankRefIds = account.lastSyncMetadata?.lastSyncBankRefIds || [];
400
+ const paymentsToInsert = paymentsToProcess.filter(
401
+ (p) => !lastSyncBankRefIds.includes(p.parsed.bankRefId)
402
+ );
403
+ await step.do(
404
+ "process new payments and update lastSyncAt",
405
+ async (ctx) => {
406
+ const eventsToEmit = [];
407
+ const bankRefIds = paymentsToInsert.map((p) => p.parsed.bankRefId).filter((id) => id != null);
408
+ const BANK_REF_ID_CHUNK_SIZE = 90;
409
+ const matchingRequests = [];
410
+ for (let i = 0; i < bankRefIds.length; i += BANK_REF_ID_CHUNK_SIZE) {
411
+ const chunkIds = bankRefIds.slice(i, i + BANK_REF_ID_CHUNK_SIZE);
412
+ const rows = await db.select().from(tables.paymentRequest).where(
402
413
  and(
403
- inArray(tables.paymentRequest.bankRefId, bankRefIds),
414
+ inArray(tables.paymentRequest.bankRefId, chunkIds),
404
415
  eq(tables.paymentRequest.accountId, account.id),
405
- eq(
406
- tables.paymentRequest.connectorKey,
407
- account.connectorKey
408
- )
416
+ eq(tables.paymentRequest.connectorKey, account.connectorKey)
409
417
  )
410
- ) : [];
411
- const requestByBankRefId = Object.fromEntries(
412
- matchingRequests.map((r) => [r.bankRefId, r])
413
418
  );
414
- const enrichedPayments = paymentsToInsert.map((p) => {
415
- const req = p.parsed.bankRefId && requestByBankRefId[p.parsed.bankRefId] || null;
416
- if (!req) return p;
417
- return {
418
- ...p,
419
- parsed: {
420
- ...p.parsed,
421
- // queue-bus: transaction matching (DBU doesn't echo these in statements)
422
- vs: p.parsed.vs ?? req.vs,
423
- ss: p.parsed.ss ?? req.ss,
424
- ks: p.parsed.ks ?? req.ks,
425
- message: p.parsed.message ?? req.message,
426
- // queue-bus: party creation
427
- creditor: {
428
- ...p.parsed.creditor,
429
- holderName: p.parsed.creditor?.holderName ?? req.creditor?.holderName
430
- },
431
- debtor: {
432
- ...p.parsed.debtor,
433
- holderName: p.parsed.debtor?.holderName ?? req.debtor?.holderName
434
- }
435
- // NOT enriched: chargeBearer, instructionPriority, refId, batchId,
436
- // createdAt, address, swiftBic — no downstream consumer in payment table
419
+ matchingRequests.push(...rows);
420
+ }
421
+ const requestByBankRefId = Object.fromEntries(
422
+ matchingRequests.map((r) => [r.bankRefId, r])
423
+ );
424
+ const enrichedPayments = paymentsToInsert.map((p) => {
425
+ const req = p.parsed.bankRefId && requestByBankRefId[p.parsed.bankRefId] || null;
426
+ if (!req) return p;
427
+ return {
428
+ ...p,
429
+ parsed: {
430
+ ...p.parsed,
431
+ // queue-bus: transaction matching (DBU doesn't echo these in statements)
432
+ vs: p.parsed.vs ?? req.vs,
433
+ ss: p.parsed.ss ?? req.ss,
434
+ ks: p.parsed.ks ?? req.ks,
435
+ message: p.parsed.message ?? req.message,
436
+ // queue-bus: party creation
437
+ creditor: {
438
+ ...p.parsed.creditor,
439
+ holderName: p.parsed.creditor?.holderName ?? req.creditor?.holderName
440
+ },
441
+ debtor: {
442
+ ...p.parsed.debtor,
443
+ holderName: p.parsed.debtor?.holderName ?? req.debtor?.holderName
437
444
  }
438
- };
439
- });
440
- const createCommands = enrichedPayments.map(
441
- (p) => createPaymentCommand(db, { payment: p.parsed }).command
445
+ // NOT enriched: chargeBearer, instructionPriority, refId, batchId,
446
+ // createdAt, address, swiftBic — no downstream consumer in payment table
447
+ }
448
+ };
449
+ });
450
+ const createCommands = enrichedPayments.map(
451
+ (p) => createPaymentCommand(db, { payment: p.parsed }).command
452
+ );
453
+ eventsToEmit.push(
454
+ ...enrichedPayments.map((p) => ({
455
+ eventType: "BANK_PAYMENT",
456
+ eventSignal: "paymentFetched",
457
+ bankPayment: p.parsed,
458
+ metadata: {
459
+ correlationId: p.parsed.correlationId,
460
+ entityId: p.parsed.id,
461
+ timestamp: /* @__PURE__ */ new Date()
462
+ }
463
+ }))
464
+ );
465
+ const lastSyncMetadata = {
466
+ payments: payments.length,
467
+ paymentsToProcess: paymentsToProcess.length,
468
+ paymentsInserted: paymentsToInsert.length,
469
+ lastSyncBankRefIds: paymentsToProcess.filter((p) => p.parsed.status === "BOOKED").map((p) => p.parsed.bankRefId),
470
+ lastSyncPayments: lastSyncBankRefIds.length,
471
+ eventsEmitted: eventsToEmit.length,
472
+ iterationCount: getStepCount(ctx),
473
+ workflowStartedAt
474
+ };
475
+ const updateLastSyncCommand = updateAccountLastSyncCommand(db, {
476
+ accountId: account.id,
477
+ lastSyncAt: now,
478
+ lastSyncMetadata
479
+ }).command;
480
+ if (createCommands.length) {
481
+ await db.batch(
482
+ asNonEmpty([updateLastSyncCommand, ...createCommands])
442
483
  );
443
- eventsToEmit.push(
444
- ...enrichedPayments.map((p) => ({
445
- eventType: "BANK_PAYMENT",
446
- eventSignal: "paymentFetched",
447
- bankPayment: p.parsed,
448
- metadata: {
449
- correlationId: p.parsed.correlationId,
450
- entityId: p.parsed.id,
451
- timestamp: /* @__PURE__ */ new Date()
452
- }
453
- }))
484
+ } else {
485
+ await updateLastSyncCommand;
486
+ }
487
+ if (eventsToEmit.length) {
488
+ await pushToQueue(
489
+ this.env.QUEUE_BUS_QUEUE,
490
+ eventsToEmit
454
491
  );
455
- const lastSyncMetadata = {
456
- payments: payments.length,
457
- paymentsToProcess: paymentsToProcess.length,
458
- paymentsInserted: paymentsToInsert.length,
459
- lastSyncBankRefIds: paymentsToProcess.filter((p) => p.parsed.status === "BOOKED").map((p) => p.parsed.bankRefId),
460
- lastSyncPayments: lastSyncBankRefIds.length,
461
- eventsEmitted: eventsToEmit.length
462
- };
463
- const updateLastSyncCommand = updateAccountLastSyncCommand(db, {
464
- accountId: account.id,
465
- lastSyncAt: now,
466
- lastSyncMetadata
467
- }).command;
468
- if (eventsToEmit.length) {
469
- await db.batch(
470
- asNonEmpty([updateLastSyncCommand, ...createCommands])
471
- );
472
- await pushToQueue(
473
- this.env.QUEUE_BUS_QUEUE,
474
- eventsToEmit
475
- );
476
- }
477
- return {
478
- ...lastSyncMetadata,
479
- newLastSyncAt: now
480
- };
481
492
  }
482
- );
483
- }
493
+ return {
494
+ ...lastSyncMetadata,
495
+ newLastSyncAt: now
496
+ };
497
+ }
498
+ );
484
499
  await step.sleep(
485
500
  "Sleep for next sync",
486
501
  `${account.syncIntervalS} seconds`
@@ -1,4 +1,4 @@
1
- import { B as BankServiceWranglerConfig } from '../shared/bank.BydmpvCs.cjs';
1
+ import { B as BankServiceWranglerConfig } from '../shared/bank.Dq24vYU7.cjs';
2
2
 
3
3
  declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
4
4
  vars: {
@@ -15,6 +15,7 @@ declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
15
15
  DBUCS_APPLICATION_CODE: string;
16
16
  DBUCS_TX_AUTH_URI: string;
17
17
  REDIRECT_URI: string;
18
+ SYNC_WORKFLOW_RESET_AFTER_ITERATIONS: string;
18
19
  ENVIRONMENT: string;
19
20
  };
20
21
  services: {
@@ -1,4 +1,4 @@
1
- import { B as BankServiceWranglerConfig } from '../shared/bank.BydmpvCs.mjs';
1
+ import { B as BankServiceWranglerConfig } from '../shared/bank.Dq24vYU7.mjs';
2
2
 
3
3
  declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
4
4
  vars: {
@@ -15,6 +15,7 @@ declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
15
15
  DBUCS_APPLICATION_CODE: string;
16
16
  DBUCS_TX_AUTH_URI: string;
17
17
  REDIRECT_URI: string;
18
+ SYNC_WORKFLOW_RESET_AFTER_ITERATIONS: string;
18
19
  ENVIRONMENT: string;
19
20
  };
20
21
  services: {
@@ -1,4 +1,4 @@
1
- import { B as BankServiceWranglerConfig } from '../shared/bank.BydmpvCs.js';
1
+ import { B as BankServiceWranglerConfig } from '../shared/bank.Dq24vYU7.js';
2
2
 
3
3
  declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
4
4
  vars: {
@@ -15,6 +15,7 @@ declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
15
15
  DBUCS_APPLICATION_CODE: string;
16
16
  DBUCS_TX_AUTH_URI: string;
17
17
  REDIRECT_URI: string;
18
+ SYNC_WORKFLOW_RESET_AFTER_ITERATIONS: string;
18
19
  ENVIRONMENT: string;
19
20
  };
20
21
  services: {
@@ -28,6 +28,8 @@ interface LastSyncMetadata {
28
28
  lastSyncPayments: number;
29
29
  lastSyncBankRefIds: string[];
30
30
  eventsEmitted: number;
31
+ iterationCount?: number;
32
+ workflowStartedAt?: number;
31
33
  }
32
34
  type ConnectorConfig = Record<string, string | number | boolean | null>;
33
35
 
@@ -1941,7 +1943,24 @@ type AccountSelectType = z.infer<typeof accountSelectSchema>;
1941
1943
  * 5. CompletedPayment - Fully processed (status: COMPLETED/BOOKED/SETTLED/REJECTED/CLOSED, has bankRefId)
1942
1944
  */
1943
1945
 
1944
- declare function isTerminalStatus(status: PaymentRequestStatus): boolean;
1946
+ /**
1947
+ * Base terminal statuses - apply to ALL connectors
1948
+ * Exported for use in database queries (connector-agnostic filtering)
1949
+ */
1950
+ declare const BASE_TERMINAL_STATUSES: ReadonlySet<PaymentRequestStatus>;
1951
+ /**
1952
+ * Check if status is terminal for given connector
1953
+ *
1954
+ * @param status - Payment request status to check
1955
+ * @param connectorKey - Optional connector key for connector-specific terminals
1956
+ * @returns true if status is terminal (no more polling needed)
1957
+ *
1958
+ * @example
1959
+ * isTerminalStatus('COMPLETED', 'DBU') // true - DBU-specific terminal
1960
+ * isTerminalStatus('COMPLETED', 'FINBRICKS') // false - not terminal for Finbricks
1961
+ * isTerminalStatus('SETTLED', 'DBU') // true - base terminal for all
1962
+ */
1963
+ declare function isTerminalStatus(status: PaymentRequestStatus, connectorKey?: string): boolean;
1945
1964
  declare function isPendingStatus(status: PaymentRequestStatus): boolean;
1946
1965
  declare function isProcessedStatus(status: PaymentRequestStatus): boolean;
1947
1966
  /**
@@ -3506,5 +3525,5 @@ type ParsedBankPayment = {
3506
3525
  */
3507
3526
  type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
3508
3527
 
3509
- export { IBankConnector as I, BATCH_MODES as M, BATCH_STATUSES as N, CHARGE_BEARERS as W, CONNECTOR_KEYS as X, COUNTRY_CODES as Y, CREDENTIALS_TYPES as Z, INSTRUCTION_PRIORITIES as a2, PAYMENT_DIRECTIONS as a4, PAYMENT_REQUEST_STATUSES as a5, PAYMENT_STATUSES as a6, PAYMENT_TYPES as a7, account as aA, accountCredentials as aB, batch as aC, ott as aD, payment as aE, paymentRequest as aF, TOKEN_TYPES as ah, accountCredentialsInsertSchema as aj, accountCredentialsSelectSchema as ak, accountCredentialsUpdateSchema as al, accountInsertSchema as am, accountSelectSchema as an, accountUpdateSchema as ao, hasPaymentAccountAssigned as ap, isBatchAuthorized as aq, isBatchCompleted as ar, isBatchFailed as as, isBatchInitiated as at, isBatchProcessing as au, isBatchReadyToSign as av, isPaymentCompleted as aw, isPendingStatus as ax, isProcessedStatus as ay, isTerminalStatus as az, tables as t, ACCOUNT_STATUSES as y };
3510
- export type { CompletedBatch 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, BankAccountWithLastSync as O, PaymentRequestSelectType as P, BankCode as Q, BatchInsertType as R, BatchLifecycle as S, BatchMode as T, BatchPayment as U, BatchStatus as V, ChargeBearer as _, PaymentSelectType as a, CountryCode as a0, CredentialsType as a1, InstructionPriority as a3, PaymentDirection as a8, PaymentFailedInsertType as a9, PaymentInsertType as aa, PaymentLifecycle as ab, PaymentPreparedInsertType as ac, PaymentStatus as ad, ProcessingBatch as ae, ReadyToSignBatch as af, ResolvedCredentials as ag, TokenType as ai, 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 };
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 };
@@ -28,6 +28,8 @@ interface LastSyncMetadata {
28
28
  lastSyncPayments: number;
29
29
  lastSyncBankRefIds: string[];
30
30
  eventsEmitted: number;
31
+ iterationCount?: number;
32
+ workflowStartedAt?: number;
31
33
  }
32
34
  type ConnectorConfig = Record<string, string | number | boolean | null>;
33
35
 
@@ -1941,7 +1943,24 @@ type AccountSelectType = z.infer<typeof accountSelectSchema>;
1941
1943
  * 5. CompletedPayment - Fully processed (status: COMPLETED/BOOKED/SETTLED/REJECTED/CLOSED, has bankRefId)
1942
1944
  */
1943
1945
 
1944
- declare function isTerminalStatus(status: PaymentRequestStatus): boolean;
1946
+ /**
1947
+ * Base terminal statuses - apply to ALL connectors
1948
+ * Exported for use in database queries (connector-agnostic filtering)
1949
+ */
1950
+ declare const BASE_TERMINAL_STATUSES: ReadonlySet<PaymentRequestStatus>;
1951
+ /**
1952
+ * Check if status is terminal for given connector
1953
+ *
1954
+ * @param status - Payment request status to check
1955
+ * @param connectorKey - Optional connector key for connector-specific terminals
1956
+ * @returns true if status is terminal (no more polling needed)
1957
+ *
1958
+ * @example
1959
+ * isTerminalStatus('COMPLETED', 'DBU') // true - DBU-specific terminal
1960
+ * isTerminalStatus('COMPLETED', 'FINBRICKS') // false - not terminal for Finbricks
1961
+ * isTerminalStatus('SETTLED', 'DBU') // true - base terminal for all
1962
+ */
1963
+ declare function isTerminalStatus(status: PaymentRequestStatus, connectorKey?: string): boolean;
1945
1964
  declare function isPendingStatus(status: PaymentRequestStatus): boolean;
1946
1965
  declare function isProcessedStatus(status: PaymentRequestStatus): boolean;
1947
1966
  /**
@@ -3506,5 +3525,5 @@ type ParsedBankPayment = {
3506
3525
  */
3507
3526
  type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
3508
3527
 
3509
- export { IBankConnector as I, BATCH_MODES as M, BATCH_STATUSES as N, CHARGE_BEARERS as W, CONNECTOR_KEYS as X, COUNTRY_CODES as Y, CREDENTIALS_TYPES as Z, INSTRUCTION_PRIORITIES as a2, PAYMENT_DIRECTIONS as a4, PAYMENT_REQUEST_STATUSES as a5, PAYMENT_STATUSES as a6, PAYMENT_TYPES as a7, account as aA, accountCredentials as aB, batch as aC, ott as aD, payment as aE, paymentRequest as aF, TOKEN_TYPES as ah, accountCredentialsInsertSchema as aj, accountCredentialsSelectSchema as ak, accountCredentialsUpdateSchema as al, accountInsertSchema as am, accountSelectSchema as an, accountUpdateSchema as ao, hasPaymentAccountAssigned as ap, isBatchAuthorized as aq, isBatchCompleted as ar, isBatchFailed as as, isBatchInitiated as at, isBatchProcessing as au, isBatchReadyToSign as av, isPaymentCompleted as aw, isPendingStatus as ax, isProcessedStatus as ay, isTerminalStatus as az, tables as t, ACCOUNT_STATUSES as y };
3510
- export type { CompletedBatch 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, BankAccountWithLastSync as O, PaymentRequestSelectType as P, BankCode as Q, BatchInsertType as R, BatchLifecycle as S, BatchMode as T, BatchPayment as U, BatchStatus as V, ChargeBearer as _, PaymentSelectType as a, CountryCode as a0, CredentialsType as a1, InstructionPriority as a3, PaymentDirection as a8, PaymentFailedInsertType as a9, PaymentInsertType as aa, PaymentLifecycle as ab, PaymentPreparedInsertType as ac, PaymentStatus as ad, ProcessingBatch as ae, ReadyToSignBatch as af, ResolvedCredentials as ag, TokenType as ai, 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 };
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 };
@@ -28,6 +28,8 @@ interface LastSyncMetadata {
28
28
  lastSyncPayments: number;
29
29
  lastSyncBankRefIds: string[];
30
30
  eventsEmitted: number;
31
+ iterationCount?: number;
32
+ workflowStartedAt?: number;
31
33
  }
32
34
  type ConnectorConfig = Record<string, string | number | boolean | null>;
33
35
 
@@ -1941,7 +1943,24 @@ type AccountSelectType = z.infer<typeof accountSelectSchema>;
1941
1943
  * 5. CompletedPayment - Fully processed (status: COMPLETED/BOOKED/SETTLED/REJECTED/CLOSED, has bankRefId)
1942
1944
  */
1943
1945
 
1944
- declare function isTerminalStatus(status: PaymentRequestStatus): boolean;
1946
+ /**
1947
+ * Base terminal statuses - apply to ALL connectors
1948
+ * Exported for use in database queries (connector-agnostic filtering)
1949
+ */
1950
+ declare const BASE_TERMINAL_STATUSES: ReadonlySet<PaymentRequestStatus>;
1951
+ /**
1952
+ * Check if status is terminal for given connector
1953
+ *
1954
+ * @param status - Payment request status to check
1955
+ * @param connectorKey - Optional connector key for connector-specific terminals
1956
+ * @returns true if status is terminal (no more polling needed)
1957
+ *
1958
+ * @example
1959
+ * isTerminalStatus('COMPLETED', 'DBU') // true - DBU-specific terminal
1960
+ * isTerminalStatus('COMPLETED', 'FINBRICKS') // false - not terminal for Finbricks
1961
+ * isTerminalStatus('SETTLED', 'DBU') // true - base terminal for all
1962
+ */
1963
+ declare function isTerminalStatus(status: PaymentRequestStatus, connectorKey?: string): boolean;
1945
1964
  declare function isPendingStatus(status: PaymentRequestStatus): boolean;
1946
1965
  declare function isProcessedStatus(status: PaymentRequestStatus): boolean;
1947
1966
  /**
@@ -3506,5 +3525,5 @@ type ParsedBankPayment = {
3506
3525
  */
3507
3526
  type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
3508
3527
 
3509
- export { IBankConnector as I, BATCH_MODES as M, BATCH_STATUSES as N, CHARGE_BEARERS as W, CONNECTOR_KEYS as X, COUNTRY_CODES as Y, CREDENTIALS_TYPES as Z, INSTRUCTION_PRIORITIES as a2, PAYMENT_DIRECTIONS as a4, PAYMENT_REQUEST_STATUSES as a5, PAYMENT_STATUSES as a6, PAYMENT_TYPES as a7, account as aA, accountCredentials as aB, batch as aC, ott as aD, payment as aE, paymentRequest as aF, TOKEN_TYPES as ah, accountCredentialsInsertSchema as aj, accountCredentialsSelectSchema as ak, accountCredentialsUpdateSchema as al, accountInsertSchema as am, accountSelectSchema as an, accountUpdateSchema as ao, hasPaymentAccountAssigned as ap, isBatchAuthorized as aq, isBatchCompleted as ar, isBatchFailed as as, isBatchInitiated as at, isBatchProcessing as au, isBatchReadyToSign as av, isPaymentCompleted as aw, isPendingStatus as ax, isProcessedStatus as ay, isTerminalStatus as az, tables as t, ACCOUNT_STATUSES as y };
3510
- export type { CompletedBatch 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, BankAccountWithLastSync as O, PaymentRequestSelectType as P, BankCode as Q, BatchInsertType as R, BatchLifecycle as S, BatchMode as T, BatchPayment as U, BatchStatus as V, ChargeBearer as _, PaymentSelectType as a, CountryCode as a0, CredentialsType as a1, InstructionPriority as a3, PaymentDirection as a8, PaymentFailedInsertType as a9, PaymentInsertType as aa, PaymentLifecycle as ab, PaymentPreparedInsertType as ac, PaymentStatus as ad, ProcessingBatch as ae, ReadyToSignBatch as af, ResolvedCredentials as ag, TokenType as ai, 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 };
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 };
@@ -1,5 +1,5 @@
1
1
  import { sql, and, eq, isNull } from 'drizzle-orm';
2
- import { B as tables } from './bank.BxZARqNE.mjs';
2
+ import { G as tables } from './bank.BOMobxtA.mjs';
3
3
  import { uuidv4 } from '@develit-io/backend-sdk';
4
4
  import './bank.BzDNLxB_.mjs';
5
5
  import 'date-fns';
@@ -3,7 +3,7 @@ import { format, parseISO } from 'date-fns';
3
3
  import { importPKCS8, SignJWT } from 'jose';
4
4
  import { z } from 'zod';
5
5
  import { CURRENCY_CODES } from '@develit-io/general-codes';
6
- import { s as schema, e as PAYMENT_REQUEST_STATUSES, h as account, i as accountCredentials, o as ott } from './bank.BzDNLxB_.mjs';
6
+ import { s as schema, h as account, i as accountCredentials, o as ott } from './bank.BzDNLxB_.mjs';
7
7
  import { defineRelations, and, not, inArray, isNull } from 'drizzle-orm';
8
8
  import { createInsertSchema, createUpdateSchema, createSelectSchema } from 'drizzle-orm/zod';
9
9
  import 'node:crypto';
@@ -45,6 +45,20 @@ async function signFinbricksJws({
45
45
  return `${header}..${signature}`;
46
46
  }
47
47
 
48
+ const SENSITIVE_FIELDS = /* @__PURE__ */ new Set(["clientId"]);
49
+ const REDACTED = "[REDACTED]";
50
+ function redactFinbricksPayload(value) {
51
+ if (Array.isArray(value)) return value.map(redactFinbricksPayload);
52
+ if (value && typeof value === "object") {
53
+ const out = {};
54
+ for (const [key, v] of Object.entries(value)) {
55
+ out[key] = SENSITIVE_FIELDS.has(key) ? REDACTED : redactFinbricksPayload(v);
56
+ }
57
+ return out;
58
+ }
59
+ return value;
60
+ }
61
+
48
62
  const useFinbricksFetch = async (config, init) => {
49
63
  const {
50
64
  baseUrl,
@@ -91,7 +105,7 @@ const useFinbricksFetch = async (config, init) => {
91
105
  {
92
106
  method,
93
107
  url: url.toString(),
94
- body: body ?? null
108
+ body: body ? redactFinbricksPayload(body) : null
95
109
  },
96
110
  null,
97
111
  2
@@ -104,14 +118,20 @@ const useFinbricksFetch = async (config, init) => {
104
118
  });
105
119
  if (!res.ok) {
106
120
  const text = await res.text().catch(() => "unknown error");
121
+ let redactedBody = text;
122
+ try {
123
+ redactedBody = redactFinbricksPayload(JSON.parse(text));
124
+ } catch {
125
+ }
107
126
  console.error("[Finbricks] error response", {
108
127
  status: res.status,
109
128
  statusText: res.statusText,
110
129
  url: url.toString(),
111
- body: text
130
+ body: redactedBody
112
131
  });
132
+ const errorMessage = typeof redactedBody === "string" ? redactedBody : JSON.stringify(redactedBody);
113
133
  throw new Error(
114
- `Finbricks API error: ${res.status} ${res.statusText} \u2013 ${text}`
134
+ `Finbricks API error: ${res.status} ${res.statusText} \u2013 ${errorMessage}`
115
135
  );
116
136
  }
117
137
  const json = await res.json();
@@ -121,7 +141,7 @@ const useFinbricksFetch = async (config, init) => {
121
141
  {
122
142
  status: res.status,
123
143
  url: url.toString(),
124
- body: json
144
+ body: redactFinbricksPayload(json)
125
145
  },
126
146
  null,
127
147
  2
@@ -162,17 +182,24 @@ const FINBRICKS_ENDPOINTS = {
162
182
  BANK_INFO: "/status/bankInfo"
163
183
  };
164
184
 
165
- const TERMINAL_STATUSES$1 = /* @__PURE__ */ new Set([
166
- "SETTLED",
167
- "REJECTED",
168
- "CLOSED"
169
- ]);
185
+ const BASE_TERMINAL_STATUSES = /* @__PURE__ */ new Set(["SETTLED", "REJECTED", "CLOSED"]);
186
+ const CONNECTOR_TERMINAL_STATUSES = {
187
+ DBU: /* @__PURE__ */ new Set(["COMPLETED", "BOOKED"])
188
+ // Finbricks: uses BASE only (polls until SETTLED)
189
+ // ERSTE: uses BASE only
190
+ };
170
191
  const PENDING_STATUSES = /* @__PURE__ */ new Set([
171
192
  "OPENED",
172
193
  "AUTHORIZED"
173
194
  ]);
174
- function isTerminalStatus(status) {
175
- return TERMINAL_STATUSES$1.has(status);
195
+ function isTerminalStatus(status, connectorKey) {
196
+ if (BASE_TERMINAL_STATUSES.has(status)) {
197
+ return true;
198
+ }
199
+ if (connectorKey && CONNECTOR_TERMINAL_STATUSES[connectorKey]) {
200
+ return CONNECTOR_TERMINAL_STATUSES[connectorKey].has(status);
201
+ }
202
+ return false;
176
203
  }
177
204
  function isPendingStatus(status) {
178
205
  return PENDING_STATUSES.has(status);
@@ -1610,10 +1637,10 @@ class DbuConnector extends IBankConnector {
1610
1637
  case "15":
1611
1638
  // RQT_STATUS_REJECTED
1612
1639
  case "33":
1613
- // RQT_STATUS_HD_CANCELLED
1614
- case "39":
1615
1640
  return "REJECTED";
1616
1641
  // AUTHORIZED - All other processing states
1642
+ // Note: RQT_STATUS_CNC_CLEARING (39) is NOT terminal per corebanking team (2026-05-12)
1643
+ // It's a request for cancellation from clearing, not a final state - falls through to default
1617
1644
  default:
1618
1645
  return "AUTHORIZED";
1619
1646
  }
@@ -1644,13 +1671,13 @@ class DbuConnector extends IBankConnector {
1644
1671
  case "14":
1645
1672
  // RQT_STATUS_EXPIRED
1646
1673
  case "33":
1647
- // RQT_STATUS_HD_CANCELLED
1648
- case "39":
1649
1674
  return "CANCELLED";
1650
1675
  // REJECTED - Explicitly rejected by bank
1651
1676
  case "15":
1652
1677
  return "REJECTED";
1653
1678
  // PENDING - All other processing states
1679
+ // Note: RQT_STATUS_CNC_CLEARING (39) is NOT terminal per corebanking team (2026-05-12)
1680
+ // It's a request for cancellation from clearing, not a final state - falls through to default
1654
1681
  default:
1655
1682
  return "PENDING";
1656
1683
  }
@@ -1982,7 +2009,7 @@ class DbuConnector extends IBankConnector {
1982
2009
  }
1983
2010
  }
1984
2011
 
1985
- const TERMINAL_STATUSES = PAYMENT_REQUEST_STATUSES.filter(isTerminalStatus);
2012
+ const TERMINAL_STATUSES = Array.from(BASE_TERMINAL_STATUSES);
1986
2013
  const getNonTerminalPaymentRequestsQuery = (db) => db.select().from(tables.paymentRequest).where(
1987
2014
  and(
1988
2015
  not(inArray(tables.paymentRequest.status, TERMINAL_STATUSES)),
@@ -2425,4 +2452,4 @@ const ottInsertSchema = createInsertSchema(ott);
2425
2452
  const ottUpdateSchema = createUpdateSchema(ott);
2426
2453
  const ottSelectSchema = createSelectSchema(ott);
2427
2454
 
2428
- export { useFinbricksFetch as A, tables as B, CsobConnector as C, DbuConnector as D, ErsteConnector as E, FINBRICKS_ENDPOINTS as F, relations as G, initiateConnector as H, IBankConnector as I, getNonTerminalPaymentRequestsQuery as J, KBConnector as K, MockCobsConnector as M, FinbricksClient as a, FinbricksConnector as b, MockConnector as c, accountCredentialsInsertSchema as d, accountCredentialsSelectSchema as e, accountCredentialsUpdateSchema as f, accountInsertSchema as g, accountSelectSchema as h, accountUpdateSchema as i, assignAccount as j, dbuAccountConfigSchema as k, hasPaymentAccountAssigned as l, isPaymentCompleted as m, isPendingStatus as n, isProcessedStatus as o, isTerminalStatus as p, ottInsertSchema as q, ottSelectSchema as r, ottUpdateSchema as s, signFinbricksJws as t, toBatchedPayment as u, toBatchedPaymentFromPaymentRequest as v, toCompletedPayment as w, toIncomingPayment as x, toPaymentRequestInsert as y, toPreparedPayment as z };
2455
+ export { useFinbricksFetch as A, BASE_TERMINAL_STATUSES as B, CsobConnector as C, DbuConnector as D, ErsteConnector as E, FINBRICKS_ENDPOINTS as F, tables as G, relations as H, IBankConnector as I, initiateConnector as J, KBConnector as K, getNonTerminalPaymentRequestsQuery as L, MockCobsConnector as M, FinbricksClient as a, FinbricksConnector as b, MockConnector as c, accountCredentialsInsertSchema as d, accountCredentialsSelectSchema as e, accountCredentialsUpdateSchema as f, accountInsertSchema as g, accountSelectSchema as h, accountUpdateSchema as i, assignAccount as j, dbuAccountConfigSchema as k, hasPaymentAccountAssigned as l, isPaymentCompleted as m, isPendingStatus as n, isProcessedStatus as o, isTerminalStatus as p, ottInsertSchema as q, ottSelectSchema as r, ottUpdateSchema as s, signFinbricksJws as t, toBatchedPayment as u, toBatchedPaymentFromPaymentRequest as v, toCompletedPayment as w, toIncomingPayment as x, toPaymentRequestInsert as y, toPreparedPayment as z };
@@ -1,4 +1,4 @@
1
- import { e as CurrencyCode, Q as BankCode, a0 as CountryCode, P as PaymentRequestSelectType } from './bank.C0JeMUxQ.js';
1
+ import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.BCqBwSKC.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
@@ -1,4 +1,4 @@
1
- import { e as CurrencyCode, Q as BankCode, a0 as CountryCode, P as PaymentRequestSelectType } from './bank.C0JeMUxQ.mjs';
1
+ import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.BCqBwSKC.mjs';
2
2
  import { z } from 'zod';
3
3
 
4
4
  type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const drizzleOrm = require('drizzle-orm');
4
- const ott_zod = require('./bank.xrNekjj9.cjs');
4
+ const ott_zod = require('./bank.DiJmJkDt.cjs');
5
5
  const backendSdk = require('@develit-io/backend-sdk');
6
6
  require('./bank.9Yw4KHyl.cjs');
7
7
  require('date-fns');