@develit-services/bank 6.1.0 → 6.1.2

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.
package/dist/base.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  const backendSdk = require('@develit-io/backend-sdk');
4
- const paymentDirection = require('./shared/bank.BsWBG0gb.cjs');
4
+ const paymentDirection = require('./shared/bank.CKX4Wnq8.cjs');
5
5
  const drizzleOrm = require('drizzle-orm');
6
6
  const cloudflare_workers = require('cloudflare:workers');
7
7
  const d1 = require('drizzle-orm/d1');
8
8
  require('jose');
9
- const bank = require('./shared/bank.CSmuzdUJ.cjs');
9
+ const bank = require('./shared/bank.bJ5o0Ck0.cjs');
10
10
  const zod = require('zod');
11
11
  const database_schema = require('./shared/bank.Ca3jzmIb.cjs');
12
12
  const generalCodes = require('@develit-io/general-codes');
package/dist/base.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.D3w3JIsQ.cjs';
2
- import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.CggHtT3y.cjs';
1
+ import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.C7zoSV8F.cjs';
2
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.Dtw4Amqo.cjs';
3
3
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
4
4
  import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
5
5
  import { WorkerEntrypoint } from 'cloudflare:workers';
@@ -2711,15 +2711,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
2711
2711
  filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
2712
2712
  filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
2713
2713
  AUTHORIZED: "AUTHORIZED";
2714
+ COMPLETED: "COMPLETED";
2714
2715
  PROCESSING: "PROCESSING";
2715
2716
  READY_TO_SIGN: "READY_TO_SIGN";
2716
- COMPLETED: "COMPLETED";
2717
2717
  FAILED: "FAILED";
2718
2718
  }>, z.ZodArray<z.ZodEnum<{
2719
2719
  AUTHORIZED: "AUTHORIZED";
2720
+ COMPLETED: "COMPLETED";
2720
2721
  PROCESSING: "PROCESSING";
2721
2722
  READY_TO_SIGN: "READY_TO_SIGN";
2722
- COMPLETED: "COMPLETED";
2723
2723
  FAILED: "FAILED";
2724
2724
  }>>]>>;
2725
2725
  }, z.core.$strip>;
@@ -2956,20 +2956,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
2956
2956
  filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
2957
2957
  filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
2958
2958
  filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
2959
- PROCESSING: "PROCESSING";
2960
- PENDING: "PENDING";
2961
2959
  BOOKED: "BOOKED";
2962
- CANCELLED: "CANCELLED";
2963
2960
  REJECTED: "REJECTED";
2961
+ PENDING: "PENDING";
2962
+ PROCESSING: "PROCESSING";
2963
+ CANCELLED: "CANCELLED";
2964
2964
  SCHEDULED: "SCHEDULED";
2965
2965
  HOLD: "HOLD";
2966
2966
  INFO: "INFO";
2967
2967
  }>, z.ZodArray<z.ZodEnum<{
2968
- PROCESSING: "PROCESSING";
2969
- PENDING: "PENDING";
2970
2968
  BOOKED: "BOOKED";
2971
- CANCELLED: "CANCELLED";
2972
2969
  REJECTED: "REJECTED";
2970
+ PENDING: "PENDING";
2971
+ PROCESSING: "PROCESSING";
2972
+ CANCELLED: "CANCELLED";
2973
2973
  SCHEDULED: "SCHEDULED";
2974
2974
  HOLD: "HOLD";
2975
2975
  INFO: "INFO";
@@ -3903,20 +3903,20 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3903
3903
  }, z.core.$strip>;
3904
3904
  filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
3905
3905
  filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
3906
+ OPENED: "OPENED";
3906
3907
  AUTHORIZED: "AUTHORIZED";
3907
3908
  COMPLETED: "COMPLETED";
3908
3909
  BOOKED: "BOOKED";
3909
- REJECTED: "REJECTED";
3910
- OPENED: "OPENED";
3911
3910
  SETTLED: "SETTLED";
3911
+ REJECTED: "REJECTED";
3912
3912
  CLOSED: "CLOSED";
3913
3913
  }>, z.ZodArray<z.ZodEnum<{
3914
+ OPENED: "OPENED";
3914
3915
  AUTHORIZED: "AUTHORIZED";
3915
3916
  COMPLETED: "COMPLETED";
3916
3917
  BOOKED: "BOOKED";
3917
- REJECTED: "REJECTED";
3918
- OPENED: "OPENED";
3919
3918
  SETTLED: "SETTLED";
3919
+ REJECTED: "REJECTED";
3920
3920
  CLOSED: "CLOSED";
3921
3921
  }>>]>>;
3922
3922
  filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
package/dist/base.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.D3w3JIsQ.mjs';
2
- import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.CDB7SWNr.mjs';
1
+ import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.C7zoSV8F.mjs';
2
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.BBNHHD0v.mjs';
3
3
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
4
4
  import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
5
5
  import { WorkerEntrypoint } from 'cloudflare:workers';
@@ -2711,15 +2711,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
2711
2711
  filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
2712
2712
  filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
2713
2713
  AUTHORIZED: "AUTHORIZED";
2714
+ COMPLETED: "COMPLETED";
2714
2715
  PROCESSING: "PROCESSING";
2715
2716
  READY_TO_SIGN: "READY_TO_SIGN";
2716
- COMPLETED: "COMPLETED";
2717
2717
  FAILED: "FAILED";
2718
2718
  }>, z.ZodArray<z.ZodEnum<{
2719
2719
  AUTHORIZED: "AUTHORIZED";
2720
+ COMPLETED: "COMPLETED";
2720
2721
  PROCESSING: "PROCESSING";
2721
2722
  READY_TO_SIGN: "READY_TO_SIGN";
2722
- COMPLETED: "COMPLETED";
2723
2723
  FAILED: "FAILED";
2724
2724
  }>>]>>;
2725
2725
  }, z.core.$strip>;
@@ -2956,20 +2956,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
2956
2956
  filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
2957
2957
  filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
2958
2958
  filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
2959
- PROCESSING: "PROCESSING";
2960
- PENDING: "PENDING";
2961
2959
  BOOKED: "BOOKED";
2962
- CANCELLED: "CANCELLED";
2963
2960
  REJECTED: "REJECTED";
2961
+ PENDING: "PENDING";
2962
+ PROCESSING: "PROCESSING";
2963
+ CANCELLED: "CANCELLED";
2964
2964
  SCHEDULED: "SCHEDULED";
2965
2965
  HOLD: "HOLD";
2966
2966
  INFO: "INFO";
2967
2967
  }>, z.ZodArray<z.ZodEnum<{
2968
- PROCESSING: "PROCESSING";
2969
- PENDING: "PENDING";
2970
2968
  BOOKED: "BOOKED";
2971
- CANCELLED: "CANCELLED";
2972
2969
  REJECTED: "REJECTED";
2970
+ PENDING: "PENDING";
2971
+ PROCESSING: "PROCESSING";
2972
+ CANCELLED: "CANCELLED";
2973
2973
  SCHEDULED: "SCHEDULED";
2974
2974
  HOLD: "HOLD";
2975
2975
  INFO: "INFO";
@@ -3903,20 +3903,20 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3903
3903
  }, z.core.$strip>;
3904
3904
  filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
3905
3905
  filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
3906
+ OPENED: "OPENED";
3906
3907
  AUTHORIZED: "AUTHORIZED";
3907
3908
  COMPLETED: "COMPLETED";
3908
3909
  BOOKED: "BOOKED";
3909
- REJECTED: "REJECTED";
3910
- OPENED: "OPENED";
3911
3910
  SETTLED: "SETTLED";
3911
+ REJECTED: "REJECTED";
3912
3912
  CLOSED: "CLOSED";
3913
3913
  }>, z.ZodArray<z.ZodEnum<{
3914
+ OPENED: "OPENED";
3914
3915
  AUTHORIZED: "AUTHORIZED";
3915
3916
  COMPLETED: "COMPLETED";
3916
3917
  BOOKED: "BOOKED";
3917
- REJECTED: "REJECTED";
3918
- OPENED: "OPENED";
3919
3918
  SETTLED: "SETTLED";
3919
+ REJECTED: "REJECTED";
3920
3920
  CLOSED: "CLOSED";
3921
3921
  }>>]>>;
3922
3922
  filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
package/dist/base.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.D3w3JIsQ.js';
2
- import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.DhMeQgpB.js';
1
+ import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.C7zoSV8F.js';
2
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.BO2rCT2t.js';
3
3
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
4
4
  import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
5
5
  import { WorkerEntrypoint } from 'cloudflare:workers';
@@ -2711,15 +2711,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
2711
2711
  filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
2712
2712
  filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
2713
2713
  AUTHORIZED: "AUTHORIZED";
2714
+ COMPLETED: "COMPLETED";
2714
2715
  PROCESSING: "PROCESSING";
2715
2716
  READY_TO_SIGN: "READY_TO_SIGN";
2716
- COMPLETED: "COMPLETED";
2717
2717
  FAILED: "FAILED";
2718
2718
  }>, z.ZodArray<z.ZodEnum<{
2719
2719
  AUTHORIZED: "AUTHORIZED";
2720
+ COMPLETED: "COMPLETED";
2720
2721
  PROCESSING: "PROCESSING";
2721
2722
  READY_TO_SIGN: "READY_TO_SIGN";
2722
- COMPLETED: "COMPLETED";
2723
2723
  FAILED: "FAILED";
2724
2724
  }>>]>>;
2725
2725
  }, z.core.$strip>;
@@ -2956,20 +2956,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
2956
2956
  filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
2957
2957
  filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
2958
2958
  filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
2959
- PROCESSING: "PROCESSING";
2960
- PENDING: "PENDING";
2961
2959
  BOOKED: "BOOKED";
2962
- CANCELLED: "CANCELLED";
2963
2960
  REJECTED: "REJECTED";
2961
+ PENDING: "PENDING";
2962
+ PROCESSING: "PROCESSING";
2963
+ CANCELLED: "CANCELLED";
2964
2964
  SCHEDULED: "SCHEDULED";
2965
2965
  HOLD: "HOLD";
2966
2966
  INFO: "INFO";
2967
2967
  }>, z.ZodArray<z.ZodEnum<{
2968
- PROCESSING: "PROCESSING";
2969
- PENDING: "PENDING";
2970
2968
  BOOKED: "BOOKED";
2971
- CANCELLED: "CANCELLED";
2972
2969
  REJECTED: "REJECTED";
2970
+ PENDING: "PENDING";
2971
+ PROCESSING: "PROCESSING";
2972
+ CANCELLED: "CANCELLED";
2973
2973
  SCHEDULED: "SCHEDULED";
2974
2974
  HOLD: "HOLD";
2975
2975
  INFO: "INFO";
@@ -3903,20 +3903,20 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3903
3903
  }, z.core.$strip>;
3904
3904
  filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
3905
3905
  filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
3906
+ OPENED: "OPENED";
3906
3907
  AUTHORIZED: "AUTHORIZED";
3907
3908
  COMPLETED: "COMPLETED";
3908
3909
  BOOKED: "BOOKED";
3909
- REJECTED: "REJECTED";
3910
- OPENED: "OPENED";
3911
3910
  SETTLED: "SETTLED";
3911
+ REJECTED: "REJECTED";
3912
3912
  CLOSED: "CLOSED";
3913
3913
  }>, z.ZodArray<z.ZodEnum<{
3914
+ OPENED: "OPENED";
3914
3915
  AUTHORIZED: "AUTHORIZED";
3915
3916
  COMPLETED: "COMPLETED";
3916
3917
  BOOKED: "BOOKED";
3917
- REJECTED: "REJECTED";
3918
- OPENED: "OPENED";
3919
3918
  SETTLED: "SETTLED";
3919
+ REJECTED: "REJECTED";
3920
3920
  CLOSED: "CLOSED";
3921
3921
  }>>]>>;
3922
3922
  filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
package/dist/base.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import { uuidv4, first, buildMultiFilterConditions as buildMultiFilterConditions$1, bankAccountMetadataSchema, structuredAddressSchema, workflowInstanceStatusSchema, develitWorker, createInternalError, action, service } from '@develit-io/backend-sdk';
2
- import { G as tables, g as accountInsertSchema, H as relations, o as isProcessedStatus, p as isTerminalStatus, L as getNonTerminalPaymentRequestsQuery, x as toIncomingPayment, N as calculateCzechIban, j as assignAccount, u as toBatchedPayment, y as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from './shared/bank.kz-PKVi5.mjs';
2
+ import { G as tables, g as accountInsertSchema, H as relations, o as isProcessedStatus, p as isTerminalStatus, L as getNonTerminalPaymentRequestsQuery, x as toIncomingPayment, N as calculateCzechIban, j as assignAccount, u as toBatchedPayment, y as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from './shared/bank.CyI5L9Lw.mjs';
3
3
  import { eq, sql, and, like, asc, desc, inArray, gte, lte, isNull, count } from 'drizzle-orm';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { drizzle } from 'drizzle-orm/d1';
6
6
  import 'jose';
7
- import { h as encrypt, d as createCredentialsResolver, i as initiateConnector, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, j as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from './shared/bank.BWR4dqQ5.mjs';
7
+ import { h as encrypt, d as createCredentialsResolver, i as initiateConnector, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, j as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from './shared/bank.DGFcfhen.mjs';
8
8
  import { z } from 'zod';
9
9
  import { I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, g as PAYMENT_TYPES, b as CONNECTOR_KEYS, a as BATCH_STATUSES, f as PAYMENT_STATUSES, P as PAYMENT_DIRECTIONS, e as PAYMENT_REQUEST_STATUSES } from './shared/bank.BT7HayCV.mjs';
10
10
  import { CURRENCY_CODES } from '@develit-io/general-codes';
@@ -1,4 +1,4 @@
1
- export { aC as account, aD as accountCredentials, aE as batch, aF as ott, aG as payment, aH as paymentRequest } from '../shared/bank.D3w3JIsQ.cjs';
1
+ export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.C7zoSV8F.cjs';
2
2
  import 'drizzle-orm/sqlite-core';
3
3
  import 'drizzle-orm';
4
4
  import '@develit-io/general-codes';
@@ -1,4 +1,4 @@
1
- export { aC as account, aD as accountCredentials, aE as batch, aF as ott, aG as payment, aH as paymentRequest } from '../shared/bank.D3w3JIsQ.mjs';
1
+ export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.C7zoSV8F.mjs';
2
2
  import 'drizzle-orm/sqlite-core';
3
3
  import 'drizzle-orm';
4
4
  import '@develit-io/general-codes';
@@ -1,4 +1,4 @@
1
- export { aC as account, aD as accountCredentials, aE as batch, aF as ott, aG as payment, aH as paymentRequest } from '../shared/bank.D3w3JIsQ.js';
1
+ export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.C7zoSV8F.js';
2
2
  import 'drizzle-orm/sqlite-core';
3
3
  import 'drizzle-orm';
4
4
  import '@develit-io/general-codes';
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  const backendSdk = require('@develit-io/backend-sdk');
4
- const paymentDirection = require('../shared/bank.BsWBG0gb.cjs');
4
+ const paymentDirection = require('../shared/bank.CKX4Wnq8.cjs');
5
5
  const batchLifecycle = require('../shared/bank.NF8bZBy0.cjs');
6
6
  const drizzleOrm = require('drizzle-orm');
7
- const bank = require('../shared/bank.CSmuzdUJ.cjs');
7
+ const bank = require('../shared/bank.bJ5o0Ck0.cjs');
8
8
  const cloudflare_workers = require('cloudflare:workers');
9
9
  const cloudflare_workflows = require('cloudflare:workflows');
10
10
  const d1 = require('drizzle-orm/d1');
@@ -66,18 +66,54 @@ const mergeLastSyncBankRefIds = (previous, incoming, cap = LAST_SYNC_BANK_REF_ID
66
66
  return [...new Set(merged)].slice(-cap);
67
67
  };
68
68
 
69
- async function pushToQueue$1(queue, message) {
70
- if (!Array.isArray(message)) {
71
- await queue.send(message, { contentType: "v8" });
72
- return;
69
+ const MAX_BATCH_MESSAGES = 100;
70
+ const MESSAGE_BYTE_CEILING = 112 * 1024;
71
+ const BATCH_BYTE_CEILING = 224 * 1024;
72
+ function estimateMessageBytes(message) {
73
+ return new TextEncoder().encode(JSON.stringify(message)).length;
74
+ }
75
+ function planQueueBatches(messages) {
76
+ const chunks = [];
77
+ const oversized = [];
78
+ let current = [];
79
+ let currentBytes = 0;
80
+ for (const message of messages) {
81
+ const bytes = estimateMessageBytes(message);
82
+ if (bytes > MESSAGE_BYTE_CEILING) {
83
+ oversized.push({ message, bytes });
84
+ continue;
85
+ }
86
+ if (current.length >= MAX_BATCH_MESSAGES || currentBytes + bytes > BATCH_BYTE_CEILING) {
87
+ chunks.push(current);
88
+ current = [];
89
+ currentBytes = 0;
90
+ }
91
+ current.push(message);
92
+ currentBytes += bytes;
73
93
  }
74
- await queue.sendBatch(
75
- message.map((m) => ({
76
- body: m,
77
- contentType: "v8"
78
- }))
79
- );
94
+ if (current.length > 0) {
95
+ chunks.push(current);
96
+ }
97
+ return { chunks, oversized };
80
98
  }
99
+ async function pushToQueue(queue, message) {
100
+ const messages = Array.isArray(message) ? message : [message];
101
+ const { chunks, oversized } = planQueueBatches(messages);
102
+ for (const chunk of chunks) {
103
+ if (chunk.length === 1) {
104
+ await queue.send(chunk[0], { contentType: "v8" });
105
+ continue;
106
+ }
107
+ await queue.sendBatch(
108
+ chunk.map((m) => ({
109
+ body: m,
110
+ contentType: "v8"
111
+ }))
112
+ );
113
+ }
114
+ return { sent: messages.length - oversized.length, oversized };
115
+ }
116
+
81
117
  async function failBatchAndPayments(db, batch, paymentRequests, reason) {
82
118
  const prCmds = paymentRequests.filter((p) => p.status !== "REJECTED").map(
83
119
  (p) => bank.updatePaymentRequestStatusCommand(db, {
@@ -289,7 +325,7 @@ class BankProcessBatch extends cloudflare_workers.WorkflowEntrypoint {
289
325
  timestamp: /* @__PURE__ */ new Date()
290
326
  }
291
327
  }));
292
- await pushToQueue$1(
328
+ await pushToQueue(
293
329
  this.env.QUEUE_BUS_QUEUE,
294
330
  eventsToEmit
295
331
  );
@@ -301,7 +337,7 @@ class BankProcessBatch extends cloudflare_workers.WorkflowEntrypoint {
301
337
  }
302
338
  if (!isMockConnector) {
303
339
  await step.do("enqueue authorization email", async () => {
304
- await pushToQueue$1(this.env.NOTIFICATIONS_QUEUE, {
340
+ await pushToQueue(this.env.NOTIFICATIONS_QUEUE, {
305
341
  type: "email",
306
342
  payload: {
307
343
  email: {
@@ -411,18 +447,6 @@ async function fetchBoundedByWindow({
411
447
  }
412
448
  }
413
449
 
414
- async function pushToQueue(queue, message) {
415
- if (!Array.isArray(message)) {
416
- await queue.send(message, { contentType: "v8" });
417
- return;
418
- }
419
- await queue.sendBatch(
420
- message.map((m) => ({
421
- body: m,
422
- contentType: "v8"
423
- }))
424
- );
425
- }
426
450
  class BankSyncAccountPayments extends cloudflare_workers.WorkflowEntrypoint {
427
451
  async run(event, step) {
428
452
  const { accountId } = event.payload;
@@ -682,10 +706,18 @@ class BankSyncAccountPayments extends cloudflare_workers.WorkflowEntrypoint {
682
706
  seenInstanceId: account.lastSyncMetadata?.instanceId ?? null
683
707
  }).command;
684
708
  if (eventsToEmit.length) {
685
- await pushToQueue(
709
+ const { oversized } = await pushToQueue(
686
710
  this.env.QUEUE_BUS_QUEUE,
687
711
  eventsToEmit
688
712
  );
713
+ for (const { message, bytes } of oversized) {
714
+ logger.error("queue.event-oversized", {
715
+ accountId,
716
+ bytes,
717
+ eventSignal: message.eventSignal,
718
+ bankRefId: message.bankPayment.bankRefId
719
+ });
720
+ }
689
721
  }
690
722
  let syncStateRows;
691
723
  if (createCommands.length) {
@@ -1,8 +1,8 @@
1
1
  import { first, uuidv4, asNonEmpty } from '@develit-io/backend-sdk';
2
- import { G as tables, H as relations, v as toBatchedPaymentFromPaymentRequest, z as toPreparedPayment, m as isPaymentCompleted } from '../shared/bank.kz-PKVi5.mjs';
2
+ import { G as tables, H as relations, v as toBatchedPaymentFromPaymentRequest, z as toPreparedPayment, m as isPaymentCompleted } from '../shared/bank.CyI5L9Lw.mjs';
3
3
  import { i as isBatchAuthorized, b as isBatchFailed, d as isBatchProcessing } from '../shared/bank.XqSw509X.mjs';
4
4
  import { sql, and, eq, inArray } from 'drizzle-orm';
5
- import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, i as initiateConnector, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.BWR4dqQ5.mjs';
5
+ import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, i as initiateConnector, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.DGFcfhen.mjs';
6
6
  import { WorkflowEntrypoint } from 'cloudflare:workers';
7
7
  import { NonRetryableError } from 'cloudflare:workflows';
8
8
  import { drizzle } from 'drizzle-orm/d1';
@@ -64,18 +64,54 @@ const mergeLastSyncBankRefIds = (previous, incoming, cap = LAST_SYNC_BANK_REF_ID
64
64
  return [...new Set(merged)].slice(-cap);
65
65
  };
66
66
 
67
- async function pushToQueue$1(queue, message) {
68
- if (!Array.isArray(message)) {
69
- await queue.send(message, { contentType: "v8" });
70
- return;
67
+ const MAX_BATCH_MESSAGES = 100;
68
+ const MESSAGE_BYTE_CEILING = 112 * 1024;
69
+ const BATCH_BYTE_CEILING = 224 * 1024;
70
+ function estimateMessageBytes(message) {
71
+ return new TextEncoder().encode(JSON.stringify(message)).length;
72
+ }
73
+ function planQueueBatches(messages) {
74
+ const chunks = [];
75
+ const oversized = [];
76
+ let current = [];
77
+ let currentBytes = 0;
78
+ for (const message of messages) {
79
+ const bytes = estimateMessageBytes(message);
80
+ if (bytes > MESSAGE_BYTE_CEILING) {
81
+ oversized.push({ message, bytes });
82
+ continue;
83
+ }
84
+ if (current.length >= MAX_BATCH_MESSAGES || currentBytes + bytes > BATCH_BYTE_CEILING) {
85
+ chunks.push(current);
86
+ current = [];
87
+ currentBytes = 0;
88
+ }
89
+ current.push(message);
90
+ currentBytes += bytes;
71
91
  }
72
- await queue.sendBatch(
73
- message.map((m) => ({
74
- body: m,
75
- contentType: "v8"
76
- }))
77
- );
92
+ if (current.length > 0) {
93
+ chunks.push(current);
94
+ }
95
+ return { chunks, oversized };
78
96
  }
97
+ async function pushToQueue(queue, message) {
98
+ const messages = Array.isArray(message) ? message : [message];
99
+ const { chunks, oversized } = planQueueBatches(messages);
100
+ for (const chunk of chunks) {
101
+ if (chunk.length === 1) {
102
+ await queue.send(chunk[0], { contentType: "v8" });
103
+ continue;
104
+ }
105
+ await queue.sendBatch(
106
+ chunk.map((m) => ({
107
+ body: m,
108
+ contentType: "v8"
109
+ }))
110
+ );
111
+ }
112
+ return { sent: messages.length - oversized.length, oversized };
113
+ }
114
+
79
115
  async function failBatchAndPayments(db, batch, paymentRequests, reason) {
80
116
  const prCmds = paymentRequests.filter((p) => p.status !== "REJECTED").map(
81
117
  (p) => updatePaymentRequestStatusCommand(db, {
@@ -287,7 +323,7 @@ class BankProcessBatch extends WorkflowEntrypoint {
287
323
  timestamp: /* @__PURE__ */ new Date()
288
324
  }
289
325
  }));
290
- await pushToQueue$1(
326
+ await pushToQueue(
291
327
  this.env.QUEUE_BUS_QUEUE,
292
328
  eventsToEmit
293
329
  );
@@ -299,7 +335,7 @@ class BankProcessBatch extends WorkflowEntrypoint {
299
335
  }
300
336
  if (!isMockConnector) {
301
337
  await step.do("enqueue authorization email", async () => {
302
- await pushToQueue$1(this.env.NOTIFICATIONS_QUEUE, {
338
+ await pushToQueue(this.env.NOTIFICATIONS_QUEUE, {
303
339
  type: "email",
304
340
  payload: {
305
341
  email: {
@@ -409,18 +445,6 @@ async function fetchBoundedByWindow({
409
445
  }
410
446
  }
411
447
 
412
- async function pushToQueue(queue, message) {
413
- if (!Array.isArray(message)) {
414
- await queue.send(message, { contentType: "v8" });
415
- return;
416
- }
417
- await queue.sendBatch(
418
- message.map((m) => ({
419
- body: m,
420
- contentType: "v8"
421
- }))
422
- );
423
- }
424
448
  class BankSyncAccountPayments extends WorkflowEntrypoint {
425
449
  async run(event, step) {
426
450
  const { accountId } = event.payload;
@@ -680,10 +704,18 @@ class BankSyncAccountPayments extends WorkflowEntrypoint {
680
704
  seenInstanceId: account.lastSyncMetadata?.instanceId ?? null
681
705
  }).command;
682
706
  if (eventsToEmit.length) {
683
- await pushToQueue(
707
+ const { oversized } = await pushToQueue(
684
708
  this.env.QUEUE_BUS_QUEUE,
685
709
  eventsToEmit
686
710
  );
711
+ for (const { message, bytes } of oversized) {
712
+ logger.error("queue.event-oversized", {
713
+ accountId,
714
+ bytes,
715
+ eventSignal: message.eventSignal,
716
+ bankRefId: message.bankPayment.bankRefId
717
+ });
718
+ }
687
719
  }
688
720
  let syncStateRows;
689
721
  if (createCommands.length) {
@@ -1,4 +1,4 @@
1
- import { e as CurrencyCode, S as BankCode, a2 as CountryCode, P as PaymentRequestSelectType } from './bank.D3w3JIsQ.cjs';
1
+ import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.C7zoSV8F.mjs';
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, S as BankCode, a2 as CountryCode, P as PaymentRequestSelectType } from './bank.D3w3JIsQ.js';
1
+ import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.C7zoSV8F.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
@@ -3280,7 +3280,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
3280
3280
  name: string;
3281
3281
  tableName: "batch";
3282
3282
  dataType: "string enum";
3283
- data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
3283
+ data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
3284
3284
  driverParam: string;
3285
3285
  notNull: false;
3286
3286
  hasDefault: false;
@@ -3656,7 +3656,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
3656
3656
  name: string;
3657
3657
  tableName: "payment";
3658
3658
  dataType: "string enum";
3659
- data: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
3659
+ data: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
3660
3660
  driverParam: string;
3661
3661
  notNull: true;
3662
3662
  hasDefault: false;
@@ -4160,7 +4160,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
4160
4160
  name: string;
4161
4161
  tableName: "payment_request";
4162
4162
  dataType: "string enum";
4163
- data: "AUTHORIZED" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
4163
+ data: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4164
4164
  driverParam: string;
4165
4165
  notNull: true;
4166
4166
  hasDefault: false;
@@ -5457,5 +5457,5 @@ type ParsedBankPayment = {
5457
5457
  */
5458
5458
  type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
5459
5459
 
5460
- export { CREDENTIALS_TYPES as $, IBankConnector as I, BASE_TERMINAL_STATUSES as N, BATCH_MODES as O, BATCH_STATUSES as Q, CHARGE_BEARERS as Y, CONNECTOR_KEYS as Z, COUNTRY_CODES as _, INSTRUCTION_PRIORITIES as a4, PAYMENT_DIRECTIONS as a6, PAYMENT_REQUEST_STATUSES as a7, PAYMENT_STATUSES as a8, PAYMENT_TYPES as a9, isProcessedStatus as aA, isTerminalStatus as aB, account as aC, accountCredentials as aD, batch as aE, ott as aF, payment as aG, paymentRequest as aH, TOKEN_TYPES as aj, accountCredentialsInsertSchema as al, accountCredentialsSelectSchema as am, accountCredentialsUpdateSchema as an, accountInsertSchema as ao, accountSelectSchema as ap, accountUpdateSchema as aq, hasPaymentAccountAssigned as ar, isBatchAuthorized as as, isBatchCompleted as at, isBatchFailed as au, isBatchInitiated as av, isBatchProcessing as aw, isBatchReadyToSign as ax, isPaymentCompleted as ay, isPendingStatus as az, tables as t, ACCOUNT_STATUSES as y };
5461
- export type { AccountSelectType as A, BatchSelectType as B, ConnectorConfig as C, AccountCredentialsSelectType as D, EndToEndIdPayment as E, AccountCredentialsUpdateType as F, AccountPatchType as G, HandleAuthorizationCallbackInput as H, AccountStatus as J, AccountUpdateType as K, LastSyncMetadata as L, AuthorizedBatch as M, PaymentRequestSelectType as P, BankAccountWithLastSync as R, BankCode as S, BatchInsertType as T, BatchLifecycle as U, BatchMode as V, BatchPayment as W, BatchStatus as X, PaymentSelectType as a, ChargeBearer as a0, CompletedBatch as a1, CountryCode as a2, CredentialsType as a3, InstructionPriority as a5, PaymentDirection as aa, PaymentFailedInsertType as ab, PaymentInsertType as ac, PaymentLifecycle as ad, PaymentPreparedInsertType as ae, PaymentStatus as af, ProcessingBatch as ag, ReadyToSignBatch as ah, ResolvedCredentials as ai, TokenType as ak, 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 };
5460
+ 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 };
5461
+ 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 };
@@ -3280,7 +3280,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
3280
3280
  name: string;
3281
3281
  tableName: "batch";
3282
3282
  dataType: "string enum";
3283
- data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
3283
+ data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
3284
3284
  driverParam: string;
3285
3285
  notNull: false;
3286
3286
  hasDefault: false;
@@ -3656,7 +3656,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
3656
3656
  name: string;
3657
3657
  tableName: "payment";
3658
3658
  dataType: "string enum";
3659
- data: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
3659
+ data: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
3660
3660
  driverParam: string;
3661
3661
  notNull: true;
3662
3662
  hasDefault: false;
@@ -4160,7 +4160,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
4160
4160
  name: string;
4161
4161
  tableName: "payment_request";
4162
4162
  dataType: "string enum";
4163
- data: "AUTHORIZED" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
4163
+ data: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4164
4164
  driverParam: string;
4165
4165
  notNull: true;
4166
4166
  hasDefault: false;
@@ -5457,5 +5457,5 @@ type ParsedBankPayment = {
5457
5457
  */
5458
5458
  type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
5459
5459
 
5460
- export { CREDENTIALS_TYPES as $, IBankConnector as I, BASE_TERMINAL_STATUSES as N, BATCH_MODES as O, BATCH_STATUSES as Q, CHARGE_BEARERS as Y, CONNECTOR_KEYS as Z, COUNTRY_CODES as _, INSTRUCTION_PRIORITIES as a4, PAYMENT_DIRECTIONS as a6, PAYMENT_REQUEST_STATUSES as a7, PAYMENT_STATUSES as a8, PAYMENT_TYPES as a9, isProcessedStatus as aA, isTerminalStatus as aB, account as aC, accountCredentials as aD, batch as aE, ott as aF, payment as aG, paymentRequest as aH, TOKEN_TYPES as aj, accountCredentialsInsertSchema as al, accountCredentialsSelectSchema as am, accountCredentialsUpdateSchema as an, accountInsertSchema as ao, accountSelectSchema as ap, accountUpdateSchema as aq, hasPaymentAccountAssigned as ar, isBatchAuthorized as as, isBatchCompleted as at, isBatchFailed as au, isBatchInitiated as av, isBatchProcessing as aw, isBatchReadyToSign as ax, isPaymentCompleted as ay, isPendingStatus as az, tables as t, ACCOUNT_STATUSES as y };
5461
- export type { AccountSelectType as A, BatchSelectType as B, ConnectorConfig as C, AccountCredentialsSelectType as D, EndToEndIdPayment as E, AccountCredentialsUpdateType as F, AccountPatchType as G, HandleAuthorizationCallbackInput as H, AccountStatus as J, AccountUpdateType as K, LastSyncMetadata as L, AuthorizedBatch as M, PaymentRequestSelectType as P, BankAccountWithLastSync as R, BankCode as S, BatchInsertType as T, BatchLifecycle as U, BatchMode as V, BatchPayment as W, BatchStatus as X, PaymentSelectType as a, ChargeBearer as a0, CompletedBatch as a1, CountryCode as a2, CredentialsType as a3, InstructionPriority as a5, PaymentDirection as aa, PaymentFailedInsertType as ab, PaymentInsertType as ac, PaymentLifecycle as ad, PaymentPreparedInsertType as ae, PaymentStatus as af, ProcessingBatch as ag, ReadyToSignBatch as ah, ResolvedCredentials as ai, TokenType as ak, 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 };
5460
+ 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 };
5461
+ 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 };
@@ -3280,7 +3280,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
3280
3280
  name: string;
3281
3281
  tableName: "batch";
3282
3282
  dataType: "string enum";
3283
- data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
3283
+ data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
3284
3284
  driverParam: string;
3285
3285
  notNull: false;
3286
3286
  hasDefault: false;
@@ -3656,7 +3656,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
3656
3656
  name: string;
3657
3657
  tableName: "payment";
3658
3658
  dataType: "string enum";
3659
- data: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
3659
+ data: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
3660
3660
  driverParam: string;
3661
3661
  notNull: true;
3662
3662
  hasDefault: false;
@@ -4160,7 +4160,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
4160
4160
  name: string;
4161
4161
  tableName: "payment_request";
4162
4162
  dataType: "string enum";
4163
- data: "AUTHORIZED" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
4163
+ data: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4164
4164
  driverParam: string;
4165
4165
  notNull: true;
4166
4166
  hasDefault: false;
@@ -5457,5 +5457,5 @@ type ParsedBankPayment = {
5457
5457
  */
5458
5458
  type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
5459
5459
 
5460
- export { CREDENTIALS_TYPES as $, IBankConnector as I, BASE_TERMINAL_STATUSES as N, BATCH_MODES as O, BATCH_STATUSES as Q, CHARGE_BEARERS as Y, CONNECTOR_KEYS as Z, COUNTRY_CODES as _, INSTRUCTION_PRIORITIES as a4, PAYMENT_DIRECTIONS as a6, PAYMENT_REQUEST_STATUSES as a7, PAYMENT_STATUSES as a8, PAYMENT_TYPES as a9, isProcessedStatus as aA, isTerminalStatus as aB, account as aC, accountCredentials as aD, batch as aE, ott as aF, payment as aG, paymentRequest as aH, TOKEN_TYPES as aj, accountCredentialsInsertSchema as al, accountCredentialsSelectSchema as am, accountCredentialsUpdateSchema as an, accountInsertSchema as ao, accountSelectSchema as ap, accountUpdateSchema as aq, hasPaymentAccountAssigned as ar, isBatchAuthorized as as, isBatchCompleted as at, isBatchFailed as au, isBatchInitiated as av, isBatchProcessing as aw, isBatchReadyToSign as ax, isPaymentCompleted as ay, isPendingStatus as az, tables as t, ACCOUNT_STATUSES as y };
5461
- export type { AccountSelectType as A, BatchSelectType as B, ConnectorConfig as C, AccountCredentialsSelectType as D, EndToEndIdPayment as E, AccountCredentialsUpdateType as F, AccountPatchType as G, HandleAuthorizationCallbackInput as H, AccountStatus as J, AccountUpdateType as K, LastSyncMetadata as L, AuthorizedBatch as M, PaymentRequestSelectType as P, BankAccountWithLastSync as R, BankCode as S, BatchInsertType as T, BatchLifecycle as U, BatchMode as V, BatchPayment as W, BatchStatus as X, PaymentSelectType as a, ChargeBearer as a0, CompletedBatch as a1, CountryCode as a2, CredentialsType as a3, InstructionPriority as a5, PaymentDirection as aa, PaymentFailedInsertType as ab, PaymentInsertType as ac, PaymentLifecycle as ad, PaymentPreparedInsertType as ae, PaymentStatus as af, ProcessingBatch as ag, ReadyToSignBatch as ah, ResolvedCredentials as ai, TokenType as ak, 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 };
5460
+ 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 };
5461
+ 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 };
@@ -1141,15 +1141,6 @@ class FinbricksConnector extends IBankConnector {
1141
1141
  initiateForeignBatchImpl(_args) {
1142
1142
  throw new Error("Finbricks: Foreign batch not implemented");
1143
1143
  }
1144
- /**
1145
- * endToEndIdentification for the SEPA rail. Optional per the Finbricks spec —
1146
- * return `undefined` to omit the field entirely, which some executing banks
1147
- * need because they overwrite the remittance text with it (see
1148
- * `CreditasConnector`).
1149
- */
1150
- buildSepaEndToEndId(payment) {
1151
- return this.buildEndToEndId(payment);
1152
- }
1153
1144
  async initiateForeignPayment(payment) {
1154
1145
  const debtorAccount = this.connectedAccounts.find(
1155
1146
  (acc) => acc.iban === payment.debtorIban
@@ -1257,10 +1248,6 @@ class FinbricksConnector extends IBankConnector {
1257
1248
  0,
1258
1249
  140
1259
1250
  );
1260
- const endToEndIdentification = this.buildSepaEndToEndId({
1261
- ...payment,
1262
- id: payment.id
1263
- });
1264
1251
  const bankRefId = backendSdk.uuidv4();
1265
1252
  const [response, error] = await backendSdk.useResult(
1266
1253
  this.finbricks.request({
@@ -1274,7 +1261,10 @@ class FinbricksConnector extends IBankConnector {
1274
1261
  },
1275
1262
  paymentIdentification: {
1276
1263
  merchantTransactionId: bankRefId,
1277
- ...endToEndIdentification && { endToEndIdentification }
1264
+ endToEndIdentification: this.buildEndToEndId({
1265
+ ...payment,
1266
+ id: payment.id
1267
+ })
1278
1268
  },
1279
1269
  amount: payment.amount,
1280
1270
  debtor: {
@@ -1139,15 +1139,6 @@ class FinbricksConnector extends IBankConnector {
1139
1139
  initiateForeignBatchImpl(_args) {
1140
1140
  throw new Error("Finbricks: Foreign batch not implemented");
1141
1141
  }
1142
- /**
1143
- * endToEndIdentification for the SEPA rail. Optional per the Finbricks spec —
1144
- * return `undefined` to omit the field entirely, which some executing banks
1145
- * need because they overwrite the remittance text with it (see
1146
- * `CreditasConnector`).
1147
- */
1148
- buildSepaEndToEndId(payment) {
1149
- return this.buildEndToEndId(payment);
1150
- }
1151
1142
  async initiateForeignPayment(payment) {
1152
1143
  const debtorAccount = this.connectedAccounts.find(
1153
1144
  (acc) => acc.iban === payment.debtorIban
@@ -1255,10 +1246,6 @@ class FinbricksConnector extends IBankConnector {
1255
1246
  0,
1256
1247
  140
1257
1248
  );
1258
- const endToEndIdentification = this.buildSepaEndToEndId({
1259
- ...payment,
1260
- id: payment.id
1261
- });
1262
1249
  const bankRefId = uuidv4();
1263
1250
  const [response, error] = await useResult(
1264
1251
  this.finbricks.request({
@@ -1272,7 +1259,10 @@ class FinbricksConnector extends IBankConnector {
1272
1259
  },
1273
1260
  paymentIdentification: {
1274
1261
  merchantTransactionId: bankRefId,
1275
- ...endToEndIdentification && { endToEndIdentification }
1262
+ endToEndIdentification: this.buildEndToEndId({
1263
+ ...payment,
1264
+ id: payment.id
1265
+ })
1276
1266
  },
1277
1267
  amount: payment.amount,
1278
1268
  debtor: {
@@ -1,5 +1,5 @@
1
1
  import { sql, and, eq, isNull } from 'drizzle-orm';
2
- import { G as tables, b as FinbricksConnector, J as buildEndToEndId, c as MockConnector, D as DbuConnector, C as CsobConnector, K as KBConnector, M as MockCobsConnector, E as ErsteConnector } from './bank.kz-PKVi5.mjs';
2
+ import { G as tables, b as FinbricksConnector, J as buildEndToEndId, c as MockConnector, D as DbuConnector, C as CsobConnector, K as KBConnector, M as MockCobsConnector, E as ErsteConnector } from './bank.CyI5L9Lw.mjs';
3
3
  import { uuidv4 } from '@develit-io/backend-sdk';
4
4
  import './bank.BT7HayCV.mjs';
5
5
  import 'date-fns';
@@ -165,20 +165,6 @@ class CreditasConnector extends FinbricksConnector {
165
165
  supportsBatch() {
166
166
  return false;
167
167
  }
168
- /**
169
- * Creditas discards `remittanceInformation.unstructured` on outgoing SEPA and
170
- * puts `endToEndIdentification` on the recipient's statement instead, so the
171
- * payer's message never arrives. Omitting E2E (optional per the Finbricks
172
- * spec) leaves the remittance as the only reference carrier.
173
- *
174
- * Evidenced by control payment 2026-07-27 (mtid
175
- * 76c75147-b25b-4581-a088-31aa394877f8, build 5.7.0): sent remittance
176
- * "interní převod DB VS2607277272" + E2E "/VS2607277272", statement showed
177
- * "/VS2607277272" — the leading slash only ever existed in E2E.
178
- */
179
- buildSepaEndToEndId() {
180
- return void 0;
181
- }
182
168
  }
183
169
 
184
170
  class CSASConnector extends FinbricksConnector {
@@ -1,4 +1,4 @@
1
- import { e as CurrencyCode, S as BankCode, a2 as CountryCode, P as PaymentRequestSelectType } from './bank.D3w3JIsQ.mjs';
1
+ import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.C7zoSV8F.cjs';
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 paymentDirection = require('./bank.BsWBG0gb.cjs');
4
+ const paymentDirection = require('./bank.CKX4Wnq8.cjs');
5
5
  const backendSdk = require('@develit-io/backend-sdk');
6
6
  require('./bank.Ca3jzmIb.cjs');
7
7
  require('date-fns');
@@ -167,20 +167,6 @@ class CreditasConnector extends paymentDirection.FinbricksConnector {
167
167
  supportsBatch() {
168
168
  return false;
169
169
  }
170
- /**
171
- * Creditas discards `remittanceInformation.unstructured` on outgoing SEPA and
172
- * puts `endToEndIdentification` on the recipient's statement instead, so the
173
- * payer's message never arrives. Omitting E2E (optional per the Finbricks
174
- * spec) leaves the remittance as the only reference carrier.
175
- *
176
- * Evidenced by control payment 2026-07-27 (mtid
177
- * 76c75147-b25b-4581-a088-31aa394877f8, build 5.7.0): sent remittance
178
- * "interní převod DB VS2607277272" + E2E "/VS2607277272", statement showed
179
- * "/VS2607277272" — the leading slash only ever existed in E2E.
180
- */
181
- buildSepaEndToEndId() {
182
- return void 0;
183
- }
184
170
  }
185
171
 
186
172
  class CSASConnector extends paymentDirection.FinbricksConnector {
package/dist/types.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const paymentDirection = require('./shared/bank.BsWBG0gb.cjs');
3
+ const paymentDirection = require('./shared/bank.CKX4Wnq8.cjs');
4
4
  const database_schema = require('./shared/bank.Ca3jzmIb.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,7 +1,7 @@
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, E as EndToEndIdPayment, 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.D3w3JIsQ.cjs';
2
- export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, F as AccountCredentialsUpdateType, G as AccountPatchType, J as AccountStatus, K as AccountUpdateType, M as AuthorizedBatch, N as BASE_TERMINAL_STATUSES, O as BATCH_MODES, Q as BATCH_STATUES, Q as BATCH_STATUSES, R as BankAccountWithLastSync, S as BankCode, T as BatchInsertType, U as BatchLifecycle, V as BatchMode, W as BatchPayment, B as BatchSelectType, X as BatchStatus, Y as CHARGE_BEARERS, Z as CONNECTOR_KEYS, _ as COUNTRY_CODES, $ as CREDENTIALS_TYPES, a0 as ChargeBearer, a1 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a2 as CountryCode, a3 as CredentialsType, e as CurrencyCode, a4 as INSTRUCTION_PRIORITIES, a5 as InstructionPriority, L as LastSyncMetadata, a6 as PAYMENT_DIRECTIONS, a7 as PAYMENT_REQUEST_STATUSES, a8 as PAYMENT_STATUSES, a9 as PAYMENT_TYPES, aa as PaymentDirection, ab as PaymentFailedInsertType, ac as PaymentInsertType, ad as PaymentLifecycle, ae as PaymentPreparedInsertType, af as PaymentStatus, ag as ProcessingBatch, ah as ReadyToSignBatch, ai as ResolvedCredentials, aj as TOKEN_TYPES, ak as TokenType, al as accountCredentialsInsertSchema, am as accountCredentialsSelectSchema, an as accountCredentialsUpdateSchema, ao as accountInsertSchema, ap as accountSelectSchema, aq as accountUpdateSchema, ar as hasPaymentAccountAssigned, as as isBatchAuthorized, at as isBatchCompleted, au as isBatchFailed, av as isBatchInitiated, aw as isBatchProcessing, ax as isBatchReadyToSign, ay as isPaymentCompleted, az as isPendingStatus, aA as isProcessedStatus, aB as isTerminalStatus } from './shared/bank.D3w3JIsQ.cjs';
3
- import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.CggHtT3y.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.CggHtT3y.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.C7zoSV8F.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.C7zoSV8F.cjs';
3
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.Dtw4Amqo.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.Dtw4Amqo.cjs';
5
5
  import { z } from 'zod';
6
6
  import { BaseEvent } from '@develit-io/backend-sdk';
7
7
  import * as drizzle_orm_zod from 'drizzle-orm/zod';
@@ -321,13 +321,6 @@ declare abstract class FinbricksConnector extends IBankConnector {
321
321
  batchId: string;
322
322
  payments: BatchedPayment[];
323
323
  }): Promise<InitiatedBatch>;
324
- /**
325
- * endToEndIdentification for the SEPA rail. Optional per the Finbricks spec —
326
- * return `undefined` to omit the field entirely, which some executing banks
327
- * need because they overwrite the remittance text with it (see
328
- * `CreditasConnector`).
329
- */
330
- protected buildSepaEndToEndId(payment: EndToEndIdPayment): string | undefined;
331
324
  initiateForeignPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
332
325
  initiateSEPAPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
333
326
  initiateDomesticPayment(payment: BatchedPayment): Promise<InitiatedPayment>;
@@ -1336,5 +1329,5 @@ declare function toCompletedPayment(payment: PreparedPayment, status: 'SETTLED'
1336
1329
  declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId: string | null): PaymentRequestInsertType;
1337
1330
  declare function toBatchedPaymentFromPaymentRequest(sp: PaymentRequestSelectType): BatchedPayment;
1338
1331
 
1339
- export { AccountAssignedPayment, AccountCredentialsInsertType, AccountInsertType, AccountSelectType, BatchMetadata, BatchedPayment, CompletedPayment, ConnectedAccount, ConnectorKey, CredentialsResolver, CsobConnector, Currency, DbuConnector, EndToEndIdPayment, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksAccount, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPayment, IncomingPayment as IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, KBConnector, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentRequestInsertType, PaymentRequestSelectType, PaymentRequestStatus, PaymentSelectType, PaymentType, PreparedPayment, SendPaymentInput, assignAccount, dbuAccountConfigSchema, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, toBatchedPayment, toBatchedPaymentFromPaymentRequest, toCompletedPayment, toIncomingPayment, toPaymentRequestInsert, toPreparedPayment, useFinbricksFetch };
1332
+ export { AccountAssignedPayment, AccountCredentialsInsertType, AccountInsertType, AccountSelectType, BatchMetadata, BatchedPayment, CompletedPayment, ConnectedAccount, ConnectorKey, CredentialsResolver, CsobConnector, Currency, DbuConnector, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksAccount, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPayment, IncomingPayment as IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, KBConnector, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentRequestInsertType, PaymentRequestSelectType, PaymentRequestStatus, PaymentSelectType, PaymentType, PreparedPayment, SendPaymentInput, assignAccount, dbuAccountConfigSchema, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, toBatchedPayment, toBatchedPaymentFromPaymentRequest, toCompletedPayment, toIncomingPayment, toPaymentRequestInsert, toPreparedPayment, useFinbricksFetch };
1340
1333
  export type { BankPaymentEvent, BankPaymentRequestEvent, DbuAccountConfig, DbuConnectorConfig, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksBatchBody, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectorConfig, FinbricksEndpoint, FinbricksEndpointPath, FinbricksFetchConfig, FinbricksForeignPaymentBody, FinbricksGetBatchStatusBody, FinbricksGetBatchStatusResponse, FinbricksGetTransactionStatusResponse, FinbricksJWSData, FinbricksPaymentBody, FinbricksProvider, FinbricksRequestInit, FinbricksSepaPaymentBody, FinbricksSupportedBanksQuery, FinbricksTransactionStatus, OneTimeTokenInsertType, OneTimeTokenPatchType, OneTimeTokenSelectType, OneTimeTokenUpdateType };
package/dist/types.d.mts CHANGED
@@ -1,7 +1,7 @@
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, E as EndToEndIdPayment, 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.D3w3JIsQ.mjs';
2
- export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, F as AccountCredentialsUpdateType, G as AccountPatchType, J as AccountStatus, K as AccountUpdateType, M as AuthorizedBatch, N as BASE_TERMINAL_STATUSES, O as BATCH_MODES, Q as BATCH_STATUES, Q as BATCH_STATUSES, R as BankAccountWithLastSync, S as BankCode, T as BatchInsertType, U as BatchLifecycle, V as BatchMode, W as BatchPayment, B as BatchSelectType, X as BatchStatus, Y as CHARGE_BEARERS, Z as CONNECTOR_KEYS, _ as COUNTRY_CODES, $ as CREDENTIALS_TYPES, a0 as ChargeBearer, a1 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a2 as CountryCode, a3 as CredentialsType, e as CurrencyCode, a4 as INSTRUCTION_PRIORITIES, a5 as InstructionPriority, L as LastSyncMetadata, a6 as PAYMENT_DIRECTIONS, a7 as PAYMENT_REQUEST_STATUSES, a8 as PAYMENT_STATUSES, a9 as PAYMENT_TYPES, aa as PaymentDirection, ab as PaymentFailedInsertType, ac as PaymentInsertType, ad as PaymentLifecycle, ae as PaymentPreparedInsertType, af as PaymentStatus, ag as ProcessingBatch, ah as ReadyToSignBatch, ai as ResolvedCredentials, aj as TOKEN_TYPES, ak as TokenType, al as accountCredentialsInsertSchema, am as accountCredentialsSelectSchema, an as accountCredentialsUpdateSchema, ao as accountInsertSchema, ap as accountSelectSchema, aq as accountUpdateSchema, ar as hasPaymentAccountAssigned, as as isBatchAuthorized, at as isBatchCompleted, au as isBatchFailed, av as isBatchInitiated, aw as isBatchProcessing, ax as isBatchReadyToSign, ay as isPaymentCompleted, az as isPendingStatus, aA as isProcessedStatus, aB as isTerminalStatus } from './shared/bank.D3w3JIsQ.mjs';
3
- import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.CDB7SWNr.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.CDB7SWNr.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.C7zoSV8F.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.C7zoSV8F.mjs';
3
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.BBNHHD0v.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.BBNHHD0v.mjs';
5
5
  import { z } from 'zod';
6
6
  import { BaseEvent } from '@develit-io/backend-sdk';
7
7
  import * as drizzle_orm_zod from 'drizzle-orm/zod';
@@ -321,13 +321,6 @@ declare abstract class FinbricksConnector extends IBankConnector {
321
321
  batchId: string;
322
322
  payments: BatchedPayment[];
323
323
  }): Promise<InitiatedBatch>;
324
- /**
325
- * endToEndIdentification for the SEPA rail. Optional per the Finbricks spec —
326
- * return `undefined` to omit the field entirely, which some executing banks
327
- * need because they overwrite the remittance text with it (see
328
- * `CreditasConnector`).
329
- */
330
- protected buildSepaEndToEndId(payment: EndToEndIdPayment): string | undefined;
331
324
  initiateForeignPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
332
325
  initiateSEPAPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
333
326
  initiateDomesticPayment(payment: BatchedPayment): Promise<InitiatedPayment>;
@@ -1336,5 +1329,5 @@ declare function toCompletedPayment(payment: PreparedPayment, status: 'SETTLED'
1336
1329
  declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId: string | null): PaymentRequestInsertType;
1337
1330
  declare function toBatchedPaymentFromPaymentRequest(sp: PaymentRequestSelectType): BatchedPayment;
1338
1331
 
1339
- export { AccountAssignedPayment, AccountCredentialsInsertType, AccountInsertType, AccountSelectType, BatchMetadata, BatchedPayment, CompletedPayment, ConnectedAccount, ConnectorKey, CredentialsResolver, CsobConnector, Currency, DbuConnector, EndToEndIdPayment, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksAccount, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPayment, IncomingPayment as IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, KBConnector, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentRequestInsertType, PaymentRequestSelectType, PaymentRequestStatus, PaymentSelectType, PaymentType, PreparedPayment, SendPaymentInput, assignAccount, dbuAccountConfigSchema, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, toBatchedPayment, toBatchedPaymentFromPaymentRequest, toCompletedPayment, toIncomingPayment, toPaymentRequestInsert, toPreparedPayment, useFinbricksFetch };
1332
+ export { AccountAssignedPayment, AccountCredentialsInsertType, AccountInsertType, AccountSelectType, BatchMetadata, BatchedPayment, CompletedPayment, ConnectedAccount, ConnectorKey, CredentialsResolver, CsobConnector, Currency, DbuConnector, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksAccount, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPayment, IncomingPayment as IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, KBConnector, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentRequestInsertType, PaymentRequestSelectType, PaymentRequestStatus, PaymentSelectType, PaymentType, PreparedPayment, SendPaymentInput, assignAccount, dbuAccountConfigSchema, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, toBatchedPayment, toBatchedPaymentFromPaymentRequest, toCompletedPayment, toIncomingPayment, toPaymentRequestInsert, toPreparedPayment, useFinbricksFetch };
1340
1333
  export type { BankPaymentEvent, BankPaymentRequestEvent, DbuAccountConfig, DbuConnectorConfig, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksBatchBody, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectorConfig, FinbricksEndpoint, FinbricksEndpointPath, FinbricksFetchConfig, FinbricksForeignPaymentBody, FinbricksGetBatchStatusBody, FinbricksGetBatchStatusResponse, FinbricksGetTransactionStatusResponse, FinbricksJWSData, FinbricksPaymentBody, FinbricksProvider, FinbricksRequestInit, FinbricksSepaPaymentBody, FinbricksSupportedBanksQuery, FinbricksTransactionStatus, OneTimeTokenInsertType, OneTimeTokenPatchType, OneTimeTokenSelectType, OneTimeTokenUpdateType };
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
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, E as EndToEndIdPayment, 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.D3w3JIsQ.js';
2
- export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, F as AccountCredentialsUpdateType, G as AccountPatchType, J as AccountStatus, K as AccountUpdateType, M as AuthorizedBatch, N as BASE_TERMINAL_STATUSES, O as BATCH_MODES, Q as BATCH_STATUES, Q as BATCH_STATUSES, R as BankAccountWithLastSync, S as BankCode, T as BatchInsertType, U as BatchLifecycle, V as BatchMode, W as BatchPayment, B as BatchSelectType, X as BatchStatus, Y as CHARGE_BEARERS, Z as CONNECTOR_KEYS, _ as COUNTRY_CODES, $ as CREDENTIALS_TYPES, a0 as ChargeBearer, a1 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a2 as CountryCode, a3 as CredentialsType, e as CurrencyCode, a4 as INSTRUCTION_PRIORITIES, a5 as InstructionPriority, L as LastSyncMetadata, a6 as PAYMENT_DIRECTIONS, a7 as PAYMENT_REQUEST_STATUSES, a8 as PAYMENT_STATUSES, a9 as PAYMENT_TYPES, aa as PaymentDirection, ab as PaymentFailedInsertType, ac as PaymentInsertType, ad as PaymentLifecycle, ae as PaymentPreparedInsertType, af as PaymentStatus, ag as ProcessingBatch, ah as ReadyToSignBatch, ai as ResolvedCredentials, aj as TOKEN_TYPES, ak as TokenType, al as accountCredentialsInsertSchema, am as accountCredentialsSelectSchema, an as accountCredentialsUpdateSchema, ao as accountInsertSchema, ap as accountSelectSchema, aq as accountUpdateSchema, ar as hasPaymentAccountAssigned, as as isBatchAuthorized, at as isBatchCompleted, au as isBatchFailed, av as isBatchInitiated, aw as isBatchProcessing, ax as isBatchReadyToSign, ay as isPaymentCompleted, az as isPendingStatus, aA as isProcessedStatus, aB as isTerminalStatus } from './shared/bank.D3w3JIsQ.js';
3
- import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.DhMeQgpB.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.DhMeQgpB.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.C7zoSV8F.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.C7zoSV8F.js';
3
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.BO2rCT2t.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.BO2rCT2t.js';
5
5
  import { z } from 'zod';
6
6
  import { BaseEvent } from '@develit-io/backend-sdk';
7
7
  import * as drizzle_orm_zod from 'drizzle-orm/zod';
@@ -321,13 +321,6 @@ declare abstract class FinbricksConnector extends IBankConnector {
321
321
  batchId: string;
322
322
  payments: BatchedPayment[];
323
323
  }): Promise<InitiatedBatch>;
324
- /**
325
- * endToEndIdentification for the SEPA rail. Optional per the Finbricks spec —
326
- * return `undefined` to omit the field entirely, which some executing banks
327
- * need because they overwrite the remittance text with it (see
328
- * `CreditasConnector`).
329
- */
330
- protected buildSepaEndToEndId(payment: EndToEndIdPayment): string | undefined;
331
324
  initiateForeignPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
332
325
  initiateSEPAPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
333
326
  initiateDomesticPayment(payment: BatchedPayment): Promise<InitiatedPayment>;
@@ -1336,5 +1329,5 @@ declare function toCompletedPayment(payment: PreparedPayment, status: 'SETTLED'
1336
1329
  declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId: string | null): PaymentRequestInsertType;
1337
1330
  declare function toBatchedPaymentFromPaymentRequest(sp: PaymentRequestSelectType): BatchedPayment;
1338
1331
 
1339
- export { AccountAssignedPayment, AccountCredentialsInsertType, AccountInsertType, AccountSelectType, BatchMetadata, BatchedPayment, CompletedPayment, ConnectedAccount, ConnectorKey, CredentialsResolver, CsobConnector, Currency, DbuConnector, EndToEndIdPayment, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksAccount, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPayment, IncomingPayment as IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, KBConnector, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentRequestInsertType, PaymentRequestSelectType, PaymentRequestStatus, PaymentSelectType, PaymentType, PreparedPayment, SendPaymentInput, assignAccount, dbuAccountConfigSchema, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, toBatchedPayment, toBatchedPaymentFromPaymentRequest, toCompletedPayment, toIncomingPayment, toPaymentRequestInsert, toPreparedPayment, useFinbricksFetch };
1332
+ export { AccountAssignedPayment, AccountCredentialsInsertType, AccountInsertType, AccountSelectType, BatchMetadata, BatchedPayment, CompletedPayment, ConnectedAccount, ConnectorKey, CredentialsResolver, CsobConnector, Currency, DbuConnector, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksAccount, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPayment, IncomingPayment as IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, KBConnector, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentRequestInsertType, PaymentRequestSelectType, PaymentRequestStatus, PaymentSelectType, PaymentType, PreparedPayment, SendPaymentInput, assignAccount, dbuAccountConfigSchema, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, toBatchedPayment, toBatchedPaymentFromPaymentRequest, toCompletedPayment, toIncomingPayment, toPaymentRequestInsert, toPreparedPayment, useFinbricksFetch };
1340
1333
  export type { BankPaymentEvent, BankPaymentRequestEvent, DbuAccountConfig, DbuConnectorConfig, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksBatchBody, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectorConfig, FinbricksEndpoint, FinbricksEndpointPath, FinbricksFetchConfig, FinbricksForeignPaymentBody, FinbricksGetBatchStatusBody, FinbricksGetBatchStatusResponse, FinbricksGetTransactionStatusResponse, FinbricksJWSData, FinbricksPaymentBody, FinbricksProvider, FinbricksRequestInit, FinbricksSepaPaymentBody, FinbricksSupportedBanksQuery, FinbricksTransactionStatus, OneTimeTokenInsertType, OneTimeTokenPatchType, OneTimeTokenSelectType, OneTimeTokenUpdateType };
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.kz-PKVi5.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.CyI5L9Lw.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.BT7HayCV.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/bank",
3
- "version": "6.1.0",
3
+ "version": "6.1.2",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {