@develit-services/bank 5.7.0 → 5.7.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.
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.B1Xa5U2u.cjs');
4
+ const paymentDirection = require('./shared/bank.CQjuudum.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.BcAwr2OG.cjs');
9
+ const bank = require('./shared/bank.B0DNtuUM.cjs');
10
10
  const zod = require('zod');
11
11
  const database_schema = require('./shared/bank.9Yw4KHyl.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.DmZly4Hz.cjs';
2
- import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.Dyt5JZy1.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.BQwwtIR4.cjs';
2
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.BUzoc8p6.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';
@@ -2699,9 +2699,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
2699
2699
  limit: z.ZodNumber;
2700
2700
  sort: z.ZodObject<{
2701
2701
  column: z.ZodEnum<{
2702
+ batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
2702
2703
  createdAt: "createdAt";
2703
2704
  updatedAt: "updatedAt";
2704
- batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
2705
2705
  }>;
2706
2706
  direction: z.ZodEnum<{
2707
2707
  asc: "asc";
@@ -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";
2715
2714
  PROCESSING: "PROCESSING";
2716
2715
  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";
2721
2720
  PROCESSING: "PROCESSING";
2722
2721
  READY_TO_SIGN: "READY_TO_SIGN";
2722
+ COMPLETED: "COMPLETED";
2723
2723
  FAILED: "FAILED";
2724
2724
  }>>]>>;
2725
2725
  }, z.core.$strip>;
@@ -2825,9 +2825,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
2825
2825
  limit: z.ZodNumber;
2826
2826
  sort: z.ZodObject<{
2827
2827
  column: z.ZodEnum<{
2828
- amount: "amount";
2829
2828
  createdAt: "createdAt";
2830
2829
  updatedAt: "updatedAt";
2830
+ amount: "amount";
2831
2831
  }>;
2832
2832
  direction: z.ZodEnum<{
2833
2833
  asc: "asc";
@@ -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
- BOOKED: "BOOKED";
2960
- REJECTED: "REJECTED";
2961
- PENDING: "PENDING";
2962
2959
  PROCESSING: "PROCESSING";
2960
+ PENDING: "PENDING";
2961
+ BOOKED: "BOOKED";
2963
2962
  CANCELLED: "CANCELLED";
2963
+ REJECTED: "REJECTED";
2964
2964
  SCHEDULED: "SCHEDULED";
2965
2965
  HOLD: "HOLD";
2966
2966
  INFO: "INFO";
2967
2967
  }>, z.ZodArray<z.ZodEnum<{
2968
- BOOKED: "BOOKED";
2969
- REJECTED: "REJECTED";
2970
- PENDING: "PENDING";
2971
2968
  PROCESSING: "PROCESSING";
2969
+ PENDING: "PENDING";
2970
+ BOOKED: "BOOKED";
2972
2971
  CANCELLED: "CANCELLED";
2972
+ REJECTED: "REJECTED";
2973
2973
  SCHEDULED: "SCHEDULED";
2974
2974
  HOLD: "HOLD";
2975
2975
  INFO: "INFO";
@@ -3875,9 +3875,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3875
3875
  limit: z.ZodNumber;
3876
3876
  sort: z.ZodObject<{
3877
3877
  column: z.ZodEnum<{
3878
- amount: "amount";
3879
3878
  createdAt: "createdAt";
3880
3879
  updatedAt: "updatedAt";
3880
+ amount: "amount";
3881
3881
  }>;
3882
3882
  direction: z.ZodEnum<{
3883
3883
  asc: "asc";
@@ -3887,19 +3887,19 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3887
3887
  filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
3888
3888
  filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
3889
3889
  AUTHORIZED: "AUTHORIZED";
3890
- OPENED: "OPENED";
3891
3890
  COMPLETED: "COMPLETED";
3892
3891
  BOOKED: "BOOKED";
3893
- SETTLED: "SETTLED";
3894
3892
  REJECTED: "REJECTED";
3893
+ OPENED: "OPENED";
3894
+ SETTLED: "SETTLED";
3895
3895
  CLOSED: "CLOSED";
3896
3896
  }>, z.ZodArray<z.ZodEnum<{
3897
3897
  AUTHORIZED: "AUTHORIZED";
3898
- OPENED: "OPENED";
3899
3898
  COMPLETED: "COMPLETED";
3900
3899
  BOOKED: "BOOKED";
3901
- SETTLED: "SETTLED";
3902
3900
  REJECTED: "REJECTED";
3901
+ OPENED: "OPENED";
3902
+ SETTLED: "SETTLED";
3903
3903
  CLOSED: "CLOSED";
3904
3904
  }>>]>>;
3905
3905
  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.DmZly4Hz.mjs';
2
- import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.sVKKxDLm.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.BQwwtIR4.mjs';
2
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.DZ3Ow4bP.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';
@@ -2699,9 +2699,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
2699
2699
  limit: z.ZodNumber;
2700
2700
  sort: z.ZodObject<{
2701
2701
  column: z.ZodEnum<{
2702
+ batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
2702
2703
  createdAt: "createdAt";
2703
2704
  updatedAt: "updatedAt";
2704
- batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
2705
2705
  }>;
2706
2706
  direction: z.ZodEnum<{
2707
2707
  asc: "asc";
@@ -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";
2715
2714
  PROCESSING: "PROCESSING";
2716
2715
  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";
2721
2720
  PROCESSING: "PROCESSING";
2722
2721
  READY_TO_SIGN: "READY_TO_SIGN";
2722
+ COMPLETED: "COMPLETED";
2723
2723
  FAILED: "FAILED";
2724
2724
  }>>]>>;
2725
2725
  }, z.core.$strip>;
@@ -2825,9 +2825,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
2825
2825
  limit: z.ZodNumber;
2826
2826
  sort: z.ZodObject<{
2827
2827
  column: z.ZodEnum<{
2828
- amount: "amount";
2829
2828
  createdAt: "createdAt";
2830
2829
  updatedAt: "updatedAt";
2830
+ amount: "amount";
2831
2831
  }>;
2832
2832
  direction: z.ZodEnum<{
2833
2833
  asc: "asc";
@@ -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
- BOOKED: "BOOKED";
2960
- REJECTED: "REJECTED";
2961
- PENDING: "PENDING";
2962
2959
  PROCESSING: "PROCESSING";
2960
+ PENDING: "PENDING";
2961
+ BOOKED: "BOOKED";
2963
2962
  CANCELLED: "CANCELLED";
2963
+ REJECTED: "REJECTED";
2964
2964
  SCHEDULED: "SCHEDULED";
2965
2965
  HOLD: "HOLD";
2966
2966
  INFO: "INFO";
2967
2967
  }>, z.ZodArray<z.ZodEnum<{
2968
- BOOKED: "BOOKED";
2969
- REJECTED: "REJECTED";
2970
- PENDING: "PENDING";
2971
2968
  PROCESSING: "PROCESSING";
2969
+ PENDING: "PENDING";
2970
+ BOOKED: "BOOKED";
2972
2971
  CANCELLED: "CANCELLED";
2972
+ REJECTED: "REJECTED";
2973
2973
  SCHEDULED: "SCHEDULED";
2974
2974
  HOLD: "HOLD";
2975
2975
  INFO: "INFO";
@@ -3875,9 +3875,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3875
3875
  limit: z.ZodNumber;
3876
3876
  sort: z.ZodObject<{
3877
3877
  column: z.ZodEnum<{
3878
- amount: "amount";
3879
3878
  createdAt: "createdAt";
3880
3879
  updatedAt: "updatedAt";
3880
+ amount: "amount";
3881
3881
  }>;
3882
3882
  direction: z.ZodEnum<{
3883
3883
  asc: "asc";
@@ -3887,19 +3887,19 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3887
3887
  filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
3888
3888
  filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
3889
3889
  AUTHORIZED: "AUTHORIZED";
3890
- OPENED: "OPENED";
3891
3890
  COMPLETED: "COMPLETED";
3892
3891
  BOOKED: "BOOKED";
3893
- SETTLED: "SETTLED";
3894
3892
  REJECTED: "REJECTED";
3893
+ OPENED: "OPENED";
3894
+ SETTLED: "SETTLED";
3895
3895
  CLOSED: "CLOSED";
3896
3896
  }>, z.ZodArray<z.ZodEnum<{
3897
3897
  AUTHORIZED: "AUTHORIZED";
3898
- OPENED: "OPENED";
3899
3898
  COMPLETED: "COMPLETED";
3900
3899
  BOOKED: "BOOKED";
3901
- SETTLED: "SETTLED";
3902
3900
  REJECTED: "REJECTED";
3901
+ OPENED: "OPENED";
3902
+ SETTLED: "SETTLED";
3903
3903
  CLOSED: "CLOSED";
3904
3904
  }>>]>>;
3905
3905
  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.DmZly4Hz.js';
2
- import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.0zYbe2ZB.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.BQwwtIR4.js';
2
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.CBpXmaTL.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';
@@ -2699,9 +2699,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
2699
2699
  limit: z.ZodNumber;
2700
2700
  sort: z.ZodObject<{
2701
2701
  column: z.ZodEnum<{
2702
+ batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
2702
2703
  createdAt: "createdAt";
2703
2704
  updatedAt: "updatedAt";
2704
- batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
2705
2705
  }>;
2706
2706
  direction: z.ZodEnum<{
2707
2707
  asc: "asc";
@@ -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";
2715
2714
  PROCESSING: "PROCESSING";
2716
2715
  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";
2721
2720
  PROCESSING: "PROCESSING";
2722
2721
  READY_TO_SIGN: "READY_TO_SIGN";
2722
+ COMPLETED: "COMPLETED";
2723
2723
  FAILED: "FAILED";
2724
2724
  }>>]>>;
2725
2725
  }, z.core.$strip>;
@@ -2825,9 +2825,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
2825
2825
  limit: z.ZodNumber;
2826
2826
  sort: z.ZodObject<{
2827
2827
  column: z.ZodEnum<{
2828
- amount: "amount";
2829
2828
  createdAt: "createdAt";
2830
2829
  updatedAt: "updatedAt";
2830
+ amount: "amount";
2831
2831
  }>;
2832
2832
  direction: z.ZodEnum<{
2833
2833
  asc: "asc";
@@ -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
- BOOKED: "BOOKED";
2960
- REJECTED: "REJECTED";
2961
- PENDING: "PENDING";
2962
2959
  PROCESSING: "PROCESSING";
2960
+ PENDING: "PENDING";
2961
+ BOOKED: "BOOKED";
2963
2962
  CANCELLED: "CANCELLED";
2963
+ REJECTED: "REJECTED";
2964
2964
  SCHEDULED: "SCHEDULED";
2965
2965
  HOLD: "HOLD";
2966
2966
  INFO: "INFO";
2967
2967
  }>, z.ZodArray<z.ZodEnum<{
2968
- BOOKED: "BOOKED";
2969
- REJECTED: "REJECTED";
2970
- PENDING: "PENDING";
2971
2968
  PROCESSING: "PROCESSING";
2969
+ PENDING: "PENDING";
2970
+ BOOKED: "BOOKED";
2972
2971
  CANCELLED: "CANCELLED";
2972
+ REJECTED: "REJECTED";
2973
2973
  SCHEDULED: "SCHEDULED";
2974
2974
  HOLD: "HOLD";
2975
2975
  INFO: "INFO";
@@ -3875,9 +3875,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3875
3875
  limit: z.ZodNumber;
3876
3876
  sort: z.ZodObject<{
3877
3877
  column: z.ZodEnum<{
3878
- amount: "amount";
3879
3878
  createdAt: "createdAt";
3880
3879
  updatedAt: "updatedAt";
3880
+ amount: "amount";
3881
3881
  }>;
3882
3882
  direction: z.ZodEnum<{
3883
3883
  asc: "asc";
@@ -3887,19 +3887,19 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3887
3887
  filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
3888
3888
  filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
3889
3889
  AUTHORIZED: "AUTHORIZED";
3890
- OPENED: "OPENED";
3891
3890
  COMPLETED: "COMPLETED";
3892
3891
  BOOKED: "BOOKED";
3893
- SETTLED: "SETTLED";
3894
3892
  REJECTED: "REJECTED";
3893
+ OPENED: "OPENED";
3894
+ SETTLED: "SETTLED";
3895
3895
  CLOSED: "CLOSED";
3896
3896
  }>, z.ZodArray<z.ZodEnum<{
3897
3897
  AUTHORIZED: "AUTHORIZED";
3898
- OPENED: "OPENED";
3899
3898
  COMPLETED: "COMPLETED";
3900
3899
  BOOKED: "BOOKED";
3901
- SETTLED: "SETTLED";
3902
3900
  REJECTED: "REJECTED";
3901
+ OPENED: "OPENED";
3902
+ SETTLED: "SETTLED";
3903
3903
  CLOSED: "CLOSED";
3904
3904
  }>>]>>;
3905
3905
  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.DI_Q2OtU.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.BVXtqHnq.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.BTsBHRsn.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.DLU1sOBm.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.BzDNLxB_.mjs';
10
10
  import { CURRENCY_CODES } from '@develit-io/general-codes';
@@ -1,4 +1,4 @@
1
- export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.DmZly4Hz.cjs';
1
+ export { aC as account, aD as accountCredentials, aE as batch, aF as ott, aG as payment, aH as paymentRequest } from '../shared/bank.BQwwtIR4.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 { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.DmZly4Hz.mjs';
1
+ export { aC as account, aD as accountCredentials, aE as batch, aF as ott, aG as payment, aH as paymentRequest } from '../shared/bank.BQwwtIR4.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 { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.DmZly4Hz.js';
1
+ export { aC as account, aD as accountCredentials, aE as batch, aF as ott, aG as payment, aH as paymentRequest } from '../shared/bank.BQwwtIR4.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.B1Xa5U2u.cjs');
4
+ const paymentDirection = require('../shared/bank.CQjuudum.cjs');
5
5
  const batchLifecycle = require('../shared/bank.NF8bZBy0.cjs');
6
6
  const drizzleOrm = require('drizzle-orm');
7
- const bank = require('../shared/bank.BcAwr2OG.cjs');
7
+ const bank = require('../shared/bank.B0DNtuUM.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');
@@ -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.DI_Q2OtU.mjs';
2
+ import { G as tables, H as relations, v as toBatchedPaymentFromPaymentRequest, z as toPreparedPayment, m as isPaymentCompleted } from '../shared/bank.BVXtqHnq.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, i as initiateConnector, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.BTsBHRsn.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.DLU1sOBm.mjs';
6
6
  import { WorkflowEntrypoint } from 'cloudflare:workers';
7
7
  import { NonRetryableError } from 'cloudflare:workflows';
8
8
  import { drizzle } from 'drizzle-orm/d1';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const drizzleOrm = require('drizzle-orm');
4
- const paymentDirection = require('./bank.B1Xa5U2u.cjs');
4
+ const paymentDirection = require('./bank.CQjuudum.cjs');
5
5
  const backendSdk = require('@develit-io/backend-sdk');
6
6
  require('./bank.9Yw4KHyl.cjs');
7
7
  require('date-fns');
@@ -167,6 +167,20 @@ 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
+ }
170
184
  }
171
185
 
172
186
  class CSASConnector extends paymentDirection.FinbricksConnector {
@@ -3230,7 +3230,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
3230
3230
  name: string;
3231
3231
  tableName: "batch";
3232
3232
  dataType: "string enum";
3233
- data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
3233
+ data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
3234
3234
  driverParam: string;
3235
3235
  notNull: false;
3236
3236
  hasDefault: false;
@@ -3606,7 +3606,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
3606
3606
  name: string;
3607
3607
  tableName: "payment";
3608
3608
  dataType: "string enum";
3609
- data: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
3609
+ data: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
3610
3610
  driverParam: string;
3611
3611
  notNull: true;
3612
3612
  hasDefault: false;
@@ -4110,7 +4110,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
4110
4110
  name: string;
4111
4111
  tableName: "payment_request";
4112
4112
  dataType: "string enum";
4113
- data: "AUTHORIZED" | "OPENED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4113
+ data: "AUTHORIZED" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
4114
4114
  driverParam: string;
4115
4115
  notNull: true;
4116
4116
  hasDefault: false;
@@ -5391,5 +5391,5 @@ type ParsedBankPayment = {
5391
5391
  */
5392
5392
  type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
5393
5393
 
5394
- 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 };
5395
- 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 };
5394
+ 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 };
5395
+ 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 };
@@ -3230,7 +3230,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
3230
3230
  name: string;
3231
3231
  tableName: "batch";
3232
3232
  dataType: "string enum";
3233
- data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
3233
+ data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
3234
3234
  driverParam: string;
3235
3235
  notNull: false;
3236
3236
  hasDefault: false;
@@ -3606,7 +3606,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
3606
3606
  name: string;
3607
3607
  tableName: "payment";
3608
3608
  dataType: "string enum";
3609
- data: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
3609
+ data: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
3610
3610
  driverParam: string;
3611
3611
  notNull: true;
3612
3612
  hasDefault: false;
@@ -4110,7 +4110,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
4110
4110
  name: string;
4111
4111
  tableName: "payment_request";
4112
4112
  dataType: "string enum";
4113
- data: "AUTHORIZED" | "OPENED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4113
+ data: "AUTHORIZED" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
4114
4114
  driverParam: string;
4115
4115
  notNull: true;
4116
4116
  hasDefault: false;
@@ -5391,5 +5391,5 @@ type ParsedBankPayment = {
5391
5391
  */
5392
5392
  type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
5393
5393
 
5394
- 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 };
5395
- 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 };
5394
+ 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 };
5395
+ 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 };
@@ -3230,7 +3230,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
3230
3230
  name: string;
3231
3231
  tableName: "batch";
3232
3232
  dataType: "string enum";
3233
- data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
3233
+ data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
3234
3234
  driverParam: string;
3235
3235
  notNull: false;
3236
3236
  hasDefault: false;
@@ -3606,7 +3606,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
3606
3606
  name: string;
3607
3607
  tableName: "payment";
3608
3608
  dataType: "string enum";
3609
- data: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
3609
+ data: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
3610
3610
  driverParam: string;
3611
3611
  notNull: true;
3612
3612
  hasDefault: false;
@@ -4110,7 +4110,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
4110
4110
  name: string;
4111
4111
  tableName: "payment_request";
4112
4112
  dataType: "string enum";
4113
- data: "AUTHORIZED" | "OPENED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4113
+ data: "AUTHORIZED" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
4114
4114
  driverParam: string;
4115
4115
  notNull: true;
4116
4116
  hasDefault: false;
@@ -5391,5 +5391,5 @@ type ParsedBankPayment = {
5391
5391
  */
5392
5392
  type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
5393
5393
 
5394
- 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 };
5395
- 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 };
5394
+ 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 };
5395
+ 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 };
@@ -1,4 +1,4 @@
1
- import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.DmZly4Hz.mjs';
1
+ import { e as CurrencyCode, S as BankCode, a2 as CountryCode, P as PaymentRequestSelectType } from './bank.BQwwtIR4.cjs';
2
2
  import { z } from 'zod';
3
3
 
4
4
  type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
@@ -803,6 +803,31 @@ const calculateCzechIban = (accountNumber, bankCode) => {
803
803
  return `CZ${checkDigits}${basicIban}`;
804
804
  };
805
805
 
806
+ const unsupported = (priority, rail, supported) => {
807
+ throw createInternalError(null, {
808
+ message: `instructionPriority=${priority} is not supported on the ${rail} rail (supported: ${supported}).`,
809
+ code: "UNSUPPORTED_INSTRUCTION_PRIORITY",
810
+ status: 422
811
+ });
812
+ };
813
+ const toFinbricksPriority = (priority) => {
814
+ if (!priority || priority === "NORM") return "NORM";
815
+ if (priority === "INST") return "INST";
816
+ return unsupported(priority, "Finbricks SEPA/domestic", "NORM, INST");
817
+ };
818
+ const toFinbricksForeignPriority = (priority) => {
819
+ if (!priority || priority === "NORM") return "NORM";
820
+ return unsupported(priority, "Finbricks foreign (SWIFT)", "NORM");
821
+ };
822
+ const toErstePriority = (priority) => {
823
+ if (!priority || priority === "NORM") return "NORM";
824
+ if (priority === "HIGH") return "HIGH";
825
+ return unsupported(priority, "Erste ISO 20022", "NORM, HIGH");
826
+ };
827
+ const assertDbuPriority = (priority) => {
828
+ if (priority === "HIGH") unsupported(priority, "DBU domestic", "NORM, INST");
829
+ };
830
+
806
831
  function autoVariableSymbol(paymentId) {
807
832
  let hash = 0;
808
833
  for (let i = 0; i < paymentId.length; i++) {
@@ -1090,7 +1115,7 @@ class FinbricksConnector extends IBankConnector {
1090
1115
  description: this.PROVIDER === "CSOB" ? composeWithUltimateCreditor(p.message, p.creditor, {
1091
1116
  stripDiacritics: p.currency !== "CZK"
1092
1117
  }) : p.message,
1093
- instructionPriority: p.instructionPriority ?? "NORM"
1118
+ instructionPriority: toFinbricksPriority(p.instructionPriority)
1094
1119
  }))
1095
1120
  }
1096
1121
  })
@@ -1114,6 +1139,15 @@ class FinbricksConnector extends IBankConnector {
1114
1139
  initiateForeignBatchImpl(_args) {
1115
1140
  throw new Error("Finbricks: Foreign batch not implemented");
1116
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
+ }
1117
1151
  async initiateForeignPayment(payment) {
1118
1152
  const debtorAccount = this.connectedAccounts.find(
1119
1153
  (acc) => acc.iban === payment.debtorIban
@@ -1171,6 +1205,9 @@ class FinbricksConnector extends IBankConnector {
1171
1205
  },
1172
1206
  ...creditorAgent && { creditorAgent },
1173
1207
  ...unstructured && { remittanceInformation: { unstructured } },
1208
+ instructionPriority: toFinbricksForeignPriority(
1209
+ payment.instructionPriority
1210
+ ),
1174
1211
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`
1175
1212
  }
1176
1213
  })
@@ -1218,6 +1255,10 @@ class FinbricksConnector extends IBankConnector {
1218
1255
  0,
1219
1256
  140
1220
1257
  );
1258
+ const endToEndIdentification = this.buildSepaEndToEndId({
1259
+ ...payment,
1260
+ id: payment.id
1261
+ });
1221
1262
  const bankRefId = uuidv4();
1222
1263
  const [response, error] = await useResult(
1223
1264
  this.finbricks.request({
@@ -1231,10 +1272,7 @@ class FinbricksConnector extends IBankConnector {
1231
1272
  },
1232
1273
  paymentIdentification: {
1233
1274
  merchantTransactionId: bankRefId,
1234
- endToEndIdentification: this.buildEndToEndId({
1235
- ...payment,
1236
- id: payment.id
1237
- })
1275
+ ...endToEndIdentification && { endToEndIdentification }
1238
1276
  },
1239
1277
  amount: payment.amount,
1240
1278
  debtor: {
@@ -1249,8 +1287,7 @@ class FinbricksConnector extends IBankConnector {
1249
1287
  ...creditorAddress && { postalAddress: creditorAddress }
1250
1288
  },
1251
1289
  remittanceInformation: { unstructured },
1252
- // Finbricks SEPA init accepts only NORM/INST — internal HIGH maps to NORM.
1253
- instructionPriority: payment.instructionPriority === "INST" ? "INST" : "NORM",
1290
+ instructionPriority: toFinbricksPriority(payment.instructionPriority),
1254
1291
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`
1255
1292
  }
1256
1293
  })
@@ -1303,7 +1340,7 @@ class FinbricksConnector extends IBankConnector {
1303
1340
  // TEMP: clientId disabled per client request — do not send.
1304
1341
  // clientId,
1305
1342
  paymentProvider: this.PROVIDER,
1306
- instructionPriority: payment.instructionPriority ?? "NORM"
1343
+ instructionPriority: toFinbricksPriority(payment.instructionPriority)
1307
1344
  }
1308
1345
  })
1309
1346
  );
@@ -1825,6 +1862,7 @@ class DbuConnector extends IBankConnector {
1825
1862
  };
1826
1863
  }
1827
1864
  async initiateDomesticPayment(payment) {
1865
+ assertDbuPriority(payment.instructionPriority);
1828
1866
  if (payment.instructionPriority === "INST") {
1829
1867
  return this.initiateInstantPayment(payment);
1830
1868
  }
@@ -2172,7 +2210,7 @@ class ErsteConnector extends IBankConnector {
2172
2210
  instructionIdentification: payment.id
2173
2211
  },
2174
2212
  paymentTypeInformation: {
2175
- instructionPriority: payment.instructionPriority ?? "NORM"
2213
+ instructionPriority: toErstePriority(payment.instructionPriority)
2176
2214
  },
2177
2215
  amount: {
2178
2216
  instructedAmount: { value: payment.amount, currency: payment.currency }
@@ -1,4 +1,4 @@
1
- import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.DmZly4Hz.js';
1
+ import { e as CurrencyCode, S as BankCode, a2 as CountryCode, P as PaymentRequestSelectType } from './bank.BQwwtIR4.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
@@ -805,6 +805,31 @@ const calculateCzechIban = (accountNumber, bankCode) => {
805
805
  return `CZ${checkDigits}${basicIban}`;
806
806
  };
807
807
 
808
+ const unsupported = (priority, rail, supported) => {
809
+ throw backendSdk.createInternalError(null, {
810
+ message: `instructionPriority=${priority} is not supported on the ${rail} rail (supported: ${supported}).`,
811
+ code: "UNSUPPORTED_INSTRUCTION_PRIORITY",
812
+ status: 422
813
+ });
814
+ };
815
+ const toFinbricksPriority = (priority) => {
816
+ if (!priority || priority === "NORM") return "NORM";
817
+ if (priority === "INST") return "INST";
818
+ return unsupported(priority, "Finbricks SEPA/domestic", "NORM, INST");
819
+ };
820
+ const toFinbricksForeignPriority = (priority) => {
821
+ if (!priority || priority === "NORM") return "NORM";
822
+ return unsupported(priority, "Finbricks foreign (SWIFT)", "NORM");
823
+ };
824
+ const toErstePriority = (priority) => {
825
+ if (!priority || priority === "NORM") return "NORM";
826
+ if (priority === "HIGH") return "HIGH";
827
+ return unsupported(priority, "Erste ISO 20022", "NORM, HIGH");
828
+ };
829
+ const assertDbuPriority = (priority) => {
830
+ if (priority === "HIGH") unsupported(priority, "DBU domestic", "NORM, INST");
831
+ };
832
+
808
833
  function autoVariableSymbol(paymentId) {
809
834
  let hash = 0;
810
835
  for (let i = 0; i < paymentId.length; i++) {
@@ -1092,7 +1117,7 @@ class FinbricksConnector extends IBankConnector {
1092
1117
  description: this.PROVIDER === "CSOB" ? composeWithUltimateCreditor(p.message, p.creditor, {
1093
1118
  stripDiacritics: p.currency !== "CZK"
1094
1119
  }) : p.message,
1095
- instructionPriority: p.instructionPriority ?? "NORM"
1120
+ instructionPriority: toFinbricksPriority(p.instructionPriority)
1096
1121
  }))
1097
1122
  }
1098
1123
  })
@@ -1116,6 +1141,15 @@ class FinbricksConnector extends IBankConnector {
1116
1141
  initiateForeignBatchImpl(_args) {
1117
1142
  throw new Error("Finbricks: Foreign batch not implemented");
1118
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
+ }
1119
1153
  async initiateForeignPayment(payment) {
1120
1154
  const debtorAccount = this.connectedAccounts.find(
1121
1155
  (acc) => acc.iban === payment.debtorIban
@@ -1173,6 +1207,9 @@ class FinbricksConnector extends IBankConnector {
1173
1207
  },
1174
1208
  ...creditorAgent && { creditorAgent },
1175
1209
  ...unstructured && { remittanceInformation: { unstructured } },
1210
+ instructionPriority: toFinbricksForeignPriority(
1211
+ payment.instructionPriority
1212
+ ),
1176
1213
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`
1177
1214
  }
1178
1215
  })
@@ -1220,6 +1257,10 @@ class FinbricksConnector extends IBankConnector {
1220
1257
  0,
1221
1258
  140
1222
1259
  );
1260
+ const endToEndIdentification = this.buildSepaEndToEndId({
1261
+ ...payment,
1262
+ id: payment.id
1263
+ });
1223
1264
  const bankRefId = backendSdk.uuidv4();
1224
1265
  const [response, error] = await backendSdk.useResult(
1225
1266
  this.finbricks.request({
@@ -1233,10 +1274,7 @@ class FinbricksConnector extends IBankConnector {
1233
1274
  },
1234
1275
  paymentIdentification: {
1235
1276
  merchantTransactionId: bankRefId,
1236
- endToEndIdentification: this.buildEndToEndId({
1237
- ...payment,
1238
- id: payment.id
1239
- })
1277
+ ...endToEndIdentification && { endToEndIdentification }
1240
1278
  },
1241
1279
  amount: payment.amount,
1242
1280
  debtor: {
@@ -1251,8 +1289,7 @@ class FinbricksConnector extends IBankConnector {
1251
1289
  ...creditorAddress && { postalAddress: creditorAddress }
1252
1290
  },
1253
1291
  remittanceInformation: { unstructured },
1254
- // Finbricks SEPA init accepts only NORM/INST — internal HIGH maps to NORM.
1255
- instructionPriority: payment.instructionPriority === "INST" ? "INST" : "NORM",
1292
+ instructionPriority: toFinbricksPriority(payment.instructionPriority),
1256
1293
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`
1257
1294
  }
1258
1295
  })
@@ -1305,7 +1342,7 @@ class FinbricksConnector extends IBankConnector {
1305
1342
  // TEMP: clientId disabled per client request — do not send.
1306
1343
  // clientId,
1307
1344
  paymentProvider: this.PROVIDER,
1308
- instructionPriority: payment.instructionPriority ?? "NORM"
1345
+ instructionPriority: toFinbricksPriority(payment.instructionPriority)
1309
1346
  }
1310
1347
  })
1311
1348
  );
@@ -1827,6 +1864,7 @@ class DbuConnector extends IBankConnector {
1827
1864
  };
1828
1865
  }
1829
1866
  async initiateDomesticPayment(payment) {
1867
+ assertDbuPriority(payment.instructionPriority);
1830
1868
  if (payment.instructionPriority === "INST") {
1831
1869
  return this.initiateInstantPayment(payment);
1832
1870
  }
@@ -2174,7 +2212,7 @@ class ErsteConnector extends IBankConnector {
2174
2212
  instructionIdentification: payment.id
2175
2213
  },
2176
2214
  paymentTypeInformation: {
2177
- instructionPriority: payment.instructionPriority ?? "NORM"
2215
+ instructionPriority: toErstePriority(payment.instructionPriority)
2178
2216
  },
2179
2217
  amount: {
2180
2218
  instructedAmount: { value: payment.amount, currency: payment.currency }
@@ -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.DI_Q2OtU.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.BVXtqHnq.mjs';
3
3
  import { uuidv4 } from '@develit-io/backend-sdk';
4
4
  import './bank.BzDNLxB_.mjs';
5
5
  import 'date-fns';
@@ -165,6 +165,20 @@ 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
+ }
168
182
  }
169
183
 
170
184
  class CSASConnector extends FinbricksConnector {
@@ -1,4 +1,4 @@
1
- import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.DmZly4Hz.cjs';
1
+ import { e as CurrencyCode, S as BankCode, a2 as CountryCode, P as PaymentRequestSelectType } from './bank.BQwwtIR4.mjs';
2
2
  import { z } from 'zod';
3
3
 
4
4
  type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
package/dist/types.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const paymentDirection = require('./shared/bank.B1Xa5U2u.cjs');
3
+ const paymentDirection = require('./shared/bank.CQjuudum.cjs');
4
4
  const database_schema = require('./shared/bank.9Yw4KHyl.cjs');
5
5
  const batchLifecycle = require('./shared/bank.NF8bZBy0.cjs');
6
6
  const generalCodes = require('@develit-io/general-codes');
package/dist/types.d.cts CHANGED
@@ -1,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, 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.DmZly4Hz.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.DmZly4Hz.cjs';
3
- import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.Dyt5JZy1.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.Dyt5JZy1.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, 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.BQwwtIR4.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.BQwwtIR4.cjs';
3
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.BUzoc8p6.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.BUzoc8p6.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,6 +321,13 @@ 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;
324
331
  initiateForeignPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
325
332
  initiateSEPAPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
326
333
  initiateDomesticPayment(payment: BatchedPayment): Promise<InitiatedPayment>;
@@ -1329,5 +1336,5 @@ declare function toCompletedPayment(payment: PreparedPayment, status: 'SETTLED'
1329
1336
  declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId: string | null): PaymentRequestInsertType;
1330
1337
  declare function toBatchedPaymentFromPaymentRequest(sp: PaymentRequestSelectType): BatchedPayment;
1331
1338
 
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 };
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 };
1333
1340
  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, 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.DmZly4Hz.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.DmZly4Hz.mjs';
3
- import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.sVKKxDLm.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.sVKKxDLm.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, 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.BQwwtIR4.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.BQwwtIR4.mjs';
3
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.DZ3Ow4bP.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.DZ3Ow4bP.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,6 +321,13 @@ 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;
324
331
  initiateForeignPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
325
332
  initiateSEPAPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
326
333
  initiateDomesticPayment(payment: BatchedPayment): Promise<InitiatedPayment>;
@@ -1329,5 +1336,5 @@ declare function toCompletedPayment(payment: PreparedPayment, status: 'SETTLED'
1329
1336
  declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId: string | null): PaymentRequestInsertType;
1330
1337
  declare function toBatchedPaymentFromPaymentRequest(sp: PaymentRequestSelectType): BatchedPayment;
1331
1338
 
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 };
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 };
1333
1340
  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, 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.DmZly4Hz.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.DmZly4Hz.js';
3
- import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.0zYbe2ZB.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.0zYbe2ZB.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, 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.BQwwtIR4.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.BQwwtIR4.js';
3
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.CBpXmaTL.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.CBpXmaTL.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,6 +321,13 @@ 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;
324
331
  initiateForeignPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
325
332
  initiateSEPAPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
326
333
  initiateDomesticPayment(payment: BatchedPayment): Promise<InitiatedPayment>;
@@ -1329,5 +1336,5 @@ declare function toCompletedPayment(payment: PreparedPayment, status: 'SETTLED'
1329
1336
  declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId: string | null): PaymentRequestInsertType;
1330
1337
  declare function toBatchedPaymentFromPaymentRequest(sp: PaymentRequestSelectType): BatchedPayment;
1331
1338
 
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 };
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 };
1333
1340
  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.DI_Q2OtU.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.BVXtqHnq.mjs';
2
2
  export { A as ACCOUNT_STATUSES, B as BATCH_MODES, a as BATCH_STATUES, a as BATCH_STATUSES, C as CHARGE_BEARERS, b as CONNECTOR_KEYS, c as COUNTRY_CODES, d as CREDENTIALS_TYPES, I as INSTRUCTION_PRIORITIES, P as PAYMENT_DIRECTIONS, e as PAYMENT_REQUEST_STATUSES, f as PAYMENT_STATUSES, g as PAYMENT_TYPES, T as TOKEN_TYPES } from './shared/bank.BzDNLxB_.mjs';
3
3
  export { i as isBatchAuthorized, a as isBatchCompleted, b as isBatchFailed, c as isBatchInitiated, d as isBatchProcessing, e as isBatchReadyToSign } from './shared/bank.XqSw509X.mjs';
4
4
  export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/bank",
3
- "version": "5.7.0",
3
+ "version": "5.7.1",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {