@develit-services/bank 6.1.2 → 6.1.4

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.CKX4Wnq8.cjs');
4
+ const paymentDirection = require('./shared/bank.Bu_Hmsem.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.bJ5o0Ck0.cjs');
9
+ const bank = require('./shared/bank.DZPFxiu7.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');
@@ -1384,11 +1384,17 @@ exports.BankServiceBase = class BankServiceBase extends backendSdk.develitWorker
1384
1384
  });
1385
1385
  const result = connector.parseAuthorizationCallback(callbackUrl);
1386
1386
  if (!result.success) {
1387
+ this.logError({
1388
+ message: `[handleAuthorizationCallback] Authorization failed for PR ${paymentRequestId ?? "unknown"} (batch ${batchId ?? "none"}) on connector ${connectorKey}`,
1389
+ error: result.error,
1390
+ code: result.code,
1391
+ callbackParams: Object.fromEntries(params.entries())
1392
+ });
1387
1393
  if (paymentRequestId) {
1388
1394
  try {
1389
1395
  await bank.updatePaymentRequestStatusCommand(this.db, {
1390
1396
  id: paymentRequestId,
1391
- statusReason: `Authorization error: ${result.error}`
1397
+ statusReason: `Authorization error: ${result.error}${result.code ? ` (code: ${result.code})` : ""}`
1392
1398
  }).command.execute();
1393
1399
  } catch (err) {
1394
1400
  this.logError({
package/dist/base.d.cts CHANGED
@@ -1,7 +1,7 @@
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
1
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
4
2
  import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
3
+ 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.r1xIlFBl.cjs';
4
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.CRQln83_.cjs';
5
5
  import { WorkerEntrypoint } from 'cloudflare:workers';
6
6
  import { DrizzleD1Database } from 'drizzle-orm/d1';
7
7
  import { z } from 'zod';
@@ -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,19 +2956,19 @@ 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";
2959
2960
  BOOKED: "BOOKED";
2960
2961
  REJECTED: "REJECTED";
2961
2962
  PENDING: "PENDING";
2962
- PROCESSING: "PROCESSING";
2963
2963
  CANCELLED: "CANCELLED";
2964
2964
  SCHEDULED: "SCHEDULED";
2965
2965
  HOLD: "HOLD";
2966
2966
  INFO: "INFO";
2967
2967
  }>, z.ZodArray<z.ZodEnum<{
2968
+ PROCESSING: "PROCESSING";
2968
2969
  BOOKED: "BOOKED";
2969
2970
  REJECTED: "REJECTED";
2970
2971
  PENDING: "PENDING";
2971
- PROCESSING: "PROCESSING";
2972
2972
  CANCELLED: "CANCELLED";
2973
2973
  SCHEDULED: "SCHEDULED";
2974
2974
  HOLD: "HOLD";
@@ -3892,9 +3892,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3892
3892
  limit: z.ZodNumber;
3893
3893
  sort: z.ZodObject<{
3894
3894
  column: z.ZodEnum<{
3895
- amount: "amount";
3896
3895
  createdAt: "createdAt";
3897
3896
  updatedAt: "updatedAt";
3897
+ amount: "amount";
3898
3898
  }>;
3899
3899
  direction: z.ZodEnum<{
3900
3900
  asc: "asc";
@@ -3903,17 +3903,17 @@ 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";
3907
3906
  AUTHORIZED: "AUTHORIZED";
3908
3907
  COMPLETED: "COMPLETED";
3908
+ OPENED: "OPENED";
3909
3909
  BOOKED: "BOOKED";
3910
3910
  SETTLED: "SETTLED";
3911
3911
  REJECTED: "REJECTED";
3912
3912
  CLOSED: "CLOSED";
3913
3913
  }>, z.ZodArray<z.ZodEnum<{
3914
- OPENED: "OPENED";
3915
3914
  AUTHORIZED: "AUTHORIZED";
3916
3915
  COMPLETED: "COMPLETED";
3916
+ OPENED: "OPENED";
3917
3917
  BOOKED: "BOOKED";
3918
3918
  SETTLED: "SETTLED";
3919
3919
  REJECTED: "REJECTED";
package/dist/base.d.mts CHANGED
@@ -1,7 +1,7 @@
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
1
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
4
2
  import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
3
+ 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.r1xIlFBl.mjs';
4
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.BW_2lyPj.mjs';
5
5
  import { WorkerEntrypoint } from 'cloudflare:workers';
6
6
  import { DrizzleD1Database } from 'drizzle-orm/d1';
7
7
  import { z } from 'zod';
@@ -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,19 +2956,19 @@ 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";
2959
2960
  BOOKED: "BOOKED";
2960
2961
  REJECTED: "REJECTED";
2961
2962
  PENDING: "PENDING";
2962
- PROCESSING: "PROCESSING";
2963
2963
  CANCELLED: "CANCELLED";
2964
2964
  SCHEDULED: "SCHEDULED";
2965
2965
  HOLD: "HOLD";
2966
2966
  INFO: "INFO";
2967
2967
  }>, z.ZodArray<z.ZodEnum<{
2968
+ PROCESSING: "PROCESSING";
2968
2969
  BOOKED: "BOOKED";
2969
2970
  REJECTED: "REJECTED";
2970
2971
  PENDING: "PENDING";
2971
- PROCESSING: "PROCESSING";
2972
2972
  CANCELLED: "CANCELLED";
2973
2973
  SCHEDULED: "SCHEDULED";
2974
2974
  HOLD: "HOLD";
@@ -3892,9 +3892,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3892
3892
  limit: z.ZodNumber;
3893
3893
  sort: z.ZodObject<{
3894
3894
  column: z.ZodEnum<{
3895
- amount: "amount";
3896
3895
  createdAt: "createdAt";
3897
3896
  updatedAt: "updatedAt";
3897
+ amount: "amount";
3898
3898
  }>;
3899
3899
  direction: z.ZodEnum<{
3900
3900
  asc: "asc";
@@ -3903,17 +3903,17 @@ 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";
3907
3906
  AUTHORIZED: "AUTHORIZED";
3908
3907
  COMPLETED: "COMPLETED";
3908
+ OPENED: "OPENED";
3909
3909
  BOOKED: "BOOKED";
3910
3910
  SETTLED: "SETTLED";
3911
3911
  REJECTED: "REJECTED";
3912
3912
  CLOSED: "CLOSED";
3913
3913
  }>, z.ZodArray<z.ZodEnum<{
3914
- OPENED: "OPENED";
3915
3914
  AUTHORIZED: "AUTHORIZED";
3916
3915
  COMPLETED: "COMPLETED";
3916
+ OPENED: "OPENED";
3917
3917
  BOOKED: "BOOKED";
3918
3918
  SETTLED: "SETTLED";
3919
3919
  REJECTED: "REJECTED";
package/dist/base.d.ts CHANGED
@@ -1,7 +1,7 @@
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
1
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
4
2
  import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
3
+ 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.r1xIlFBl.js';
4
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.Cu_7g0PZ.js';
5
5
  import { WorkerEntrypoint } from 'cloudflare:workers';
6
6
  import { DrizzleD1Database } from 'drizzle-orm/d1';
7
7
  import { z } from 'zod';
@@ -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,19 +2956,19 @@ 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";
2959
2960
  BOOKED: "BOOKED";
2960
2961
  REJECTED: "REJECTED";
2961
2962
  PENDING: "PENDING";
2962
- PROCESSING: "PROCESSING";
2963
2963
  CANCELLED: "CANCELLED";
2964
2964
  SCHEDULED: "SCHEDULED";
2965
2965
  HOLD: "HOLD";
2966
2966
  INFO: "INFO";
2967
2967
  }>, z.ZodArray<z.ZodEnum<{
2968
+ PROCESSING: "PROCESSING";
2968
2969
  BOOKED: "BOOKED";
2969
2970
  REJECTED: "REJECTED";
2970
2971
  PENDING: "PENDING";
2971
- PROCESSING: "PROCESSING";
2972
2972
  CANCELLED: "CANCELLED";
2973
2973
  SCHEDULED: "SCHEDULED";
2974
2974
  HOLD: "HOLD";
@@ -3892,9 +3892,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3892
3892
  limit: z.ZodNumber;
3893
3893
  sort: z.ZodObject<{
3894
3894
  column: z.ZodEnum<{
3895
- amount: "amount";
3896
3895
  createdAt: "createdAt";
3897
3896
  updatedAt: "updatedAt";
3897
+ amount: "amount";
3898
3898
  }>;
3899
3899
  direction: z.ZodEnum<{
3900
3900
  asc: "asc";
@@ -3903,17 +3903,17 @@ 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";
3907
3906
  AUTHORIZED: "AUTHORIZED";
3908
3907
  COMPLETED: "COMPLETED";
3908
+ OPENED: "OPENED";
3909
3909
  BOOKED: "BOOKED";
3910
3910
  SETTLED: "SETTLED";
3911
3911
  REJECTED: "REJECTED";
3912
3912
  CLOSED: "CLOSED";
3913
3913
  }>, z.ZodArray<z.ZodEnum<{
3914
- OPENED: "OPENED";
3915
3914
  AUTHORIZED: "AUTHORIZED";
3916
3915
  COMPLETED: "COMPLETED";
3916
+ OPENED: "OPENED";
3917
3917
  BOOKED: "BOOKED";
3918
3918
  SETTLED: "SETTLED";
3919
3919
  REJECTED: "REJECTED";
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.CyI5L9Lw.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.DfTsWbsY.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.DGFcfhen.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.BfBGaZs8.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';
@@ -1382,11 +1382,17 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
1382
1382
  });
1383
1383
  const result = connector.parseAuthorizationCallback(callbackUrl);
1384
1384
  if (!result.success) {
1385
+ this.logError({
1386
+ message: `[handleAuthorizationCallback] Authorization failed for PR ${paymentRequestId ?? "unknown"} (batch ${batchId ?? "none"}) on connector ${connectorKey}`,
1387
+ error: result.error,
1388
+ code: result.code,
1389
+ callbackParams: Object.fromEntries(params.entries())
1390
+ });
1385
1391
  if (paymentRequestId) {
1386
1392
  try {
1387
1393
  await updatePaymentRequestStatusCommand(this.db, {
1388
1394
  id: paymentRequestId,
1389
- statusReason: `Authorization error: ${result.error}`
1395
+ statusReason: `Authorization error: ${result.error}${result.code ? ` (code: ${result.code})` : ""}`
1390
1396
  }).command.execute();
1391
1397
  } catch (err) {
1392
1398
  this.logError({
@@ -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.C7zoSV8F.cjs';
1
+ export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.r1xIlFBl.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.C7zoSV8F.mjs';
1
+ export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.r1xIlFBl.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.C7zoSV8F.js';
1
+ export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.r1xIlFBl.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.CKX4Wnq8.cjs');
4
+ const paymentDirection = require('../shared/bank.Bu_Hmsem.cjs');
5
5
  const batchLifecycle = require('../shared/bank.NF8bZBy0.cjs');
6
6
  const drizzleOrm = require('drizzle-orm');
7
- const bank = require('../shared/bank.bJ5o0Ck0.cjs');
7
+ const bank = require('../shared/bank.DZPFxiu7.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.CyI5L9Lw.mjs';
2
+ import { G as tables, H as relations, v as toBatchedPaymentFromPaymentRequest, z as toPreparedPayment, m as isPaymentCompleted } from '../shared/bank.DfTsWbsY.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.DGFcfhen.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.BfBGaZs8.mjs';
6
6
  import { WorkflowEntrypoint } from 'cloudflare:workers';
7
7
  import { NonRetryableError } from 'cloudflare:workflows';
8
8
  import { drizzle } from 'drizzle-orm/d1';
@@ -1,4 +1,4 @@
1
- import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.C7zoSV8F.mjs';
1
+ import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.r1xIlFBl.mjs';
2
2
  import { z } from 'zod';
3
3
 
4
4
  type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
@@ -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.CyI5L9Lw.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.DfTsWbsY.mjs';
3
3
  import { uuidv4 } from '@develit-io/backend-sdk';
4
4
  import './bank.BT7HayCV.mjs';
5
5
  import 'date-fns';
@@ -56,7 +56,7 @@ function buildFinbricksApiError(args) {
56
56
  httpStatusText: args.httpStatusText,
57
57
  code: typeof env.code === "number" ? env.code : void 0,
58
58
  finbricksMessage: typeof env.message === "string" ? env.message : void 0,
59
- xrequestId: typeof env.xrequestId === "string" ? env.xrequestId : void 0,
59
+ xrequestId: typeof env.xrequestId === "string" ? env.xrequestId : args.requestId ?? void 0,
60
60
  body: args.body
61
61
  });
62
62
  }
@@ -168,15 +168,18 @@ const useFinbricksFetch = async (config, init) => {
168
168
  redactedBody = redactFinbricksPayload(JSON.parse(text));
169
169
  } catch {
170
170
  }
171
+ const responseRequestId = res.headers.get("x-request-id");
171
172
  console.error("[Finbricks] error response", {
172
173
  status: res.status,
173
174
  statusText: res.statusText,
174
175
  url: url.toString(),
176
+ requestId: responseRequestId,
175
177
  body: redactedBody
176
178
  });
177
179
  throw buildFinbricksApiError({
178
180
  httpStatus: res.status,
179
181
  httpStatusText: res.statusText,
182
+ requestId: responseRequestId,
180
183
  body: redactedBody
181
184
  });
182
185
  }
@@ -912,6 +915,23 @@ class FinbricksConnector extends IBankConnector {
912
915
  supportsPaymentType(paymentType) {
913
916
  return paymentType === "DOMESTIC" || paymentType === "SEPA" || paymentType === "SWIFT";
914
917
  }
918
+ /**
919
+ * ČSOB mandates the UDT and we are an obliged entity, so a missing one must
920
+ * fail the payment — buildUltimateCreditor used to drop it silently instead.
921
+ */
922
+ assertUltimateCreditor(creditor, options) {
923
+ if (this.PROVIDER !== "CSOB") return;
924
+ if (buildUltimateCreditor(creditor, options)) return;
925
+ const missing = [
926
+ !creditor.holderName && "holder name",
927
+ !(creditor.address?.streetName ?? creditor.address?.buildingNumber) && "street address"
928
+ ].filter(Boolean);
929
+ throw backendSdk.createInternalError(null, {
930
+ status: 422,
931
+ code: "VALID-B-019",
932
+ message: `\u010CSOB requires the recipient (UDT) in the payment's free-text field, but the creditor${creditor.holderName ? ` "${creditor.holderName}"` : ""} is missing its ${missing.join(" and ")}. Complete the counterparty data and retry.`
933
+ });
934
+ }
915
935
  async getClientId(accountId) {
916
936
  if (!this.resolveCredentials) {
917
937
  throw backendSdk.createInternalError(null, {
@@ -1094,6 +1114,11 @@ class FinbricksConnector extends IBankConnector {
1094
1114
  message: `Batch for unauthorized client with iban: ${payments[0].debtor.iban}`
1095
1115
  });
1096
1116
  await this.getClientId(authorizedClient.id);
1117
+ for (const p of payments) {
1118
+ this.assertUltimateCreditor(p.creditor, {
1119
+ stripDiacritics: p.currency !== "CZK"
1120
+ });
1121
+ }
1097
1122
  const [response, error] = await backendSdk.useResult(
1098
1123
  this.finbricks.request({
1099
1124
  endpoint: FINBRICKS_ENDPOINTS.TRANSACTION_BATCH_INIT,
@@ -1163,6 +1188,9 @@ class FinbricksConnector extends IBankConnector {
1163
1188
  ks: payment.ks
1164
1189
  });
1165
1190
  const remittanceBase = [reference, payment.message?.trim()].filter(Boolean).join(" ") || void 0;
1191
+ this.assertUltimateCreditor(payment.creditor, {
1192
+ stripDiacritics: payment.currency !== "CZK"
1193
+ });
1166
1194
  const unstructured = this.PROVIDER === "CSOB" ? composeWithUltimateCreditor(remittanceBase, payment.creditor, {
1167
1195
  stripDiacritics: payment.currency !== "CZK"
1168
1196
  }) : remittanceBase?.slice(0, 140) || void 0;
@@ -1238,9 +1266,9 @@ class FinbricksConnector extends IBankConnector {
1238
1266
  ss: payment.ss,
1239
1267
  ks: payment.ks
1240
1268
  });
1241
- const udt = this.PROVIDER === "CSOB" ? buildUltimateCreditor(payment.creditor, {
1242
- stripDiacritics: payment.currency !== "CZK"
1243
- }) : void 0;
1269
+ const udtOptions = { stripDiacritics: payment.currency !== "CZK" };
1270
+ this.assertUltimateCreditor(payment.creditor, udtOptions);
1271
+ const udt = this.PROVIDER === "CSOB" ? buildUltimateCreditor(payment.creditor, udtOptions) : void 0;
1244
1272
  const reserved = (reference ? reference.length + 1 : 0) + (udt ? udt.length + 2 : 0);
1245
1273
  const base = [message.slice(0, Math.max(0, 140 - reserved)), reference].filter(Boolean).join(" ");
1246
1274
  const combined = udt ? base ? `${base}, ${udt}` : udt : base;
@@ -1309,29 +1337,57 @@ class FinbricksConnector extends IBankConnector {
1309
1337
  (acc) => acc.iban === payment.debtor.iban
1310
1338
  );
1311
1339
  await this.getClientId(debtorAccount.id);
1340
+ const debtorIban = resolveCzechDomesticIban(payment.debtor);
1341
+ const creditorIban = resolveCzechDomesticIban(payment.creditor);
1342
+ if (!creditorIban || !payment.creditor.holderName) {
1343
+ throw backendSdk.createInternalError(null, {
1344
+ status: 422,
1345
+ code: "VALID-B-018",
1346
+ message: `Domestic payment needs the creditor's ${!creditorIban ? "IBAN (or account number + bank code)" : "name"}.`
1347
+ });
1348
+ }
1349
+ const udtOptions = { stripDiacritics: false };
1350
+ this.assertUltimateCreditor(payment.creditor, udtOptions);
1351
+ const composed = this.PROVIDER === "CSOB" ? composeWithUltimateCreditor(
1352
+ payment.message,
1353
+ payment.creditor,
1354
+ udtOptions
1355
+ ) : payment.message?.trim() || void 0;
1356
+ const unstructured = this.PROVIDER === "CSOB" && (composed?.length ?? 0) < 3 ? "Platba" : composed;
1312
1357
  const [response, error] = await backendSdk.useResult(
1313
1358
  this.finbricks.request({
1314
1359
  endpoint: FINBRICKS_ENDPOINTS.TRANSACTION_INIT,
1315
1360
  method: "POST",
1316
1361
  body: {
1317
- merchantId: this.finbricks.MERCHANT_ID,
1318
- merchantTransactionId: payment.id,
1319
- totalPrice: payment.amount,
1320
- debtorAccountIban: resolveCzechDomesticIban(payment.debtor),
1321
- creditorAccountIban: resolveCzechDomesticIban(payment.creditor),
1322
- creditorName: payment.creditor.holderName,
1323
- description: this.PROVIDER === "CSOB" ? composeWithUltimateCreditor(payment.message, payment.creditor, {
1324
- // This rail is CZK-only (it sends no currency), and CZ domestic
1325
- // clearing accepts diacritics unlike the foreign rail.
1326
- stripDiacritics: false
1327
- }) : payment.message,
1328
- variableSymbol: payment.vs ?? (payment.ss ? void 0 : autoVariableSymbol(payment.id)),
1329
- specificSymbol: payment.ss,
1330
- constantSymbol: payment.ks,
1362
+ merchantIdentification: {
1363
+ merchantId: this.finbricks.MERCHANT_ID
1364
+ // TEMP: clientId disabled per client request — do not send.
1365
+ // clientId,
1366
+ },
1367
+ paymentIdentification: {
1368
+ merchantTransactionId: payment.id,
1369
+ czechSymbols: {
1370
+ variableSymbol: payment.vs ?? (payment.ss ? void 0 : autoVariableSymbol(payment.id)),
1371
+ specificSymbol: payment.ss ?? void 0,
1372
+ constantSymbol: payment.ks ?? void 0
1373
+ }
1374
+ },
1375
+ amount: {
1376
+ value: payment.amount,
1377
+ currency: payment.currency ?? "CZK"
1378
+ },
1379
+ debtor: {
1380
+ ...debtorIban && {
1381
+ accountIdentification: { value: debtorIban, type: "IBAN" }
1382
+ },
1383
+ paymentProvider: this.PROVIDER
1384
+ },
1385
+ creditor: {
1386
+ accountIdentification: { value: creditorIban, type: "IBAN" },
1387
+ creditorName: payment.creditor.holderName.slice(0, 100)
1388
+ },
1389
+ ...unstructured && { remittanceInformation: { unstructured } },
1331
1390
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`,
1332
- // TEMP: clientId disabled per client request — do not send.
1333
- // clientId,
1334
- paymentProvider: this.PROVIDER,
1335
1391
  instructionPriority: toFinbricksPriority(payment.instructionPriority)
1336
1392
  }
1337
1393
  })
@@ -1,4 +1,4 @@
1
- import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.C7zoSV8F.cjs';
1
+ import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.r1xIlFBl.cjs';
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, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.C7zoSV8F.js';
1
+ import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.r1xIlFBl.js';
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.CKX4Wnq8.cjs');
4
+ const paymentDirection = require('./bank.Bu_Hmsem.cjs');
5
5
  const backendSdk = require('@develit-io/backend-sdk');
6
6
  require('./bank.Ca3jzmIb.cjs');
7
7
  require('date-fns');
@@ -54,7 +54,7 @@ function buildFinbricksApiError(args) {
54
54
  httpStatusText: args.httpStatusText,
55
55
  code: typeof env.code === "number" ? env.code : void 0,
56
56
  finbricksMessage: typeof env.message === "string" ? env.message : void 0,
57
- xrequestId: typeof env.xrequestId === "string" ? env.xrequestId : void 0,
57
+ xrequestId: typeof env.xrequestId === "string" ? env.xrequestId : args.requestId ?? void 0,
58
58
  body: args.body
59
59
  });
60
60
  }
@@ -166,15 +166,18 @@ const useFinbricksFetch = async (config, init) => {
166
166
  redactedBody = redactFinbricksPayload(JSON.parse(text));
167
167
  } catch {
168
168
  }
169
+ const responseRequestId = res.headers.get("x-request-id");
169
170
  console.error("[Finbricks] error response", {
170
171
  status: res.status,
171
172
  statusText: res.statusText,
172
173
  url: url.toString(),
174
+ requestId: responseRequestId,
173
175
  body: redactedBody
174
176
  });
175
177
  throw buildFinbricksApiError({
176
178
  httpStatus: res.status,
177
179
  httpStatusText: res.statusText,
180
+ requestId: responseRequestId,
178
181
  body: redactedBody
179
182
  });
180
183
  }
@@ -910,6 +913,23 @@ class FinbricksConnector extends IBankConnector {
910
913
  supportsPaymentType(paymentType) {
911
914
  return paymentType === "DOMESTIC" || paymentType === "SEPA" || paymentType === "SWIFT";
912
915
  }
916
+ /**
917
+ * ČSOB mandates the UDT and we are an obliged entity, so a missing one must
918
+ * fail the payment — buildUltimateCreditor used to drop it silently instead.
919
+ */
920
+ assertUltimateCreditor(creditor, options) {
921
+ if (this.PROVIDER !== "CSOB") return;
922
+ if (buildUltimateCreditor(creditor, options)) return;
923
+ const missing = [
924
+ !creditor.holderName && "holder name",
925
+ !(creditor.address?.streetName ?? creditor.address?.buildingNumber) && "street address"
926
+ ].filter(Boolean);
927
+ throw createInternalError(null, {
928
+ status: 422,
929
+ code: "VALID-B-019",
930
+ message: `\u010CSOB requires the recipient (UDT) in the payment's free-text field, but the creditor${creditor.holderName ? ` "${creditor.holderName}"` : ""} is missing its ${missing.join(" and ")}. Complete the counterparty data and retry.`
931
+ });
932
+ }
913
933
  async getClientId(accountId) {
914
934
  if (!this.resolveCredentials) {
915
935
  throw createInternalError(null, {
@@ -1092,6 +1112,11 @@ class FinbricksConnector extends IBankConnector {
1092
1112
  message: `Batch for unauthorized client with iban: ${payments[0].debtor.iban}`
1093
1113
  });
1094
1114
  await this.getClientId(authorizedClient.id);
1115
+ for (const p of payments) {
1116
+ this.assertUltimateCreditor(p.creditor, {
1117
+ stripDiacritics: p.currency !== "CZK"
1118
+ });
1119
+ }
1095
1120
  const [response, error] = await useResult(
1096
1121
  this.finbricks.request({
1097
1122
  endpoint: FINBRICKS_ENDPOINTS.TRANSACTION_BATCH_INIT,
@@ -1161,6 +1186,9 @@ class FinbricksConnector extends IBankConnector {
1161
1186
  ks: payment.ks
1162
1187
  });
1163
1188
  const remittanceBase = [reference, payment.message?.trim()].filter(Boolean).join(" ") || void 0;
1189
+ this.assertUltimateCreditor(payment.creditor, {
1190
+ stripDiacritics: payment.currency !== "CZK"
1191
+ });
1164
1192
  const unstructured = this.PROVIDER === "CSOB" ? composeWithUltimateCreditor(remittanceBase, payment.creditor, {
1165
1193
  stripDiacritics: payment.currency !== "CZK"
1166
1194
  }) : remittanceBase?.slice(0, 140) || void 0;
@@ -1236,9 +1264,9 @@ class FinbricksConnector extends IBankConnector {
1236
1264
  ss: payment.ss,
1237
1265
  ks: payment.ks
1238
1266
  });
1239
- const udt = this.PROVIDER === "CSOB" ? buildUltimateCreditor(payment.creditor, {
1240
- stripDiacritics: payment.currency !== "CZK"
1241
- }) : void 0;
1267
+ const udtOptions = { stripDiacritics: payment.currency !== "CZK" };
1268
+ this.assertUltimateCreditor(payment.creditor, udtOptions);
1269
+ const udt = this.PROVIDER === "CSOB" ? buildUltimateCreditor(payment.creditor, udtOptions) : void 0;
1242
1270
  const reserved = (reference ? reference.length + 1 : 0) + (udt ? udt.length + 2 : 0);
1243
1271
  const base = [message.slice(0, Math.max(0, 140 - reserved)), reference].filter(Boolean).join(" ");
1244
1272
  const combined = udt ? base ? `${base}, ${udt}` : udt : base;
@@ -1307,29 +1335,57 @@ class FinbricksConnector extends IBankConnector {
1307
1335
  (acc) => acc.iban === payment.debtor.iban
1308
1336
  );
1309
1337
  await this.getClientId(debtorAccount.id);
1338
+ const debtorIban = resolveCzechDomesticIban(payment.debtor);
1339
+ const creditorIban = resolveCzechDomesticIban(payment.creditor);
1340
+ if (!creditorIban || !payment.creditor.holderName) {
1341
+ throw createInternalError(null, {
1342
+ status: 422,
1343
+ code: "VALID-B-018",
1344
+ message: `Domestic payment needs the creditor's ${!creditorIban ? "IBAN (or account number + bank code)" : "name"}.`
1345
+ });
1346
+ }
1347
+ const udtOptions = { stripDiacritics: false };
1348
+ this.assertUltimateCreditor(payment.creditor, udtOptions);
1349
+ const composed = this.PROVIDER === "CSOB" ? composeWithUltimateCreditor(
1350
+ payment.message,
1351
+ payment.creditor,
1352
+ udtOptions
1353
+ ) : payment.message?.trim() || void 0;
1354
+ const unstructured = this.PROVIDER === "CSOB" && (composed?.length ?? 0) < 3 ? "Platba" : composed;
1310
1355
  const [response, error] = await useResult(
1311
1356
  this.finbricks.request({
1312
1357
  endpoint: FINBRICKS_ENDPOINTS.TRANSACTION_INIT,
1313
1358
  method: "POST",
1314
1359
  body: {
1315
- merchantId: this.finbricks.MERCHANT_ID,
1316
- merchantTransactionId: payment.id,
1317
- totalPrice: payment.amount,
1318
- debtorAccountIban: resolveCzechDomesticIban(payment.debtor),
1319
- creditorAccountIban: resolveCzechDomesticIban(payment.creditor),
1320
- creditorName: payment.creditor.holderName,
1321
- description: this.PROVIDER === "CSOB" ? composeWithUltimateCreditor(payment.message, payment.creditor, {
1322
- // This rail is CZK-only (it sends no currency), and CZ domestic
1323
- // clearing accepts diacritics unlike the foreign rail.
1324
- stripDiacritics: false
1325
- }) : payment.message,
1326
- variableSymbol: payment.vs ?? (payment.ss ? void 0 : autoVariableSymbol(payment.id)),
1327
- specificSymbol: payment.ss,
1328
- constantSymbol: payment.ks,
1360
+ merchantIdentification: {
1361
+ merchantId: this.finbricks.MERCHANT_ID
1362
+ // TEMP: clientId disabled per client request — do not send.
1363
+ // clientId,
1364
+ },
1365
+ paymentIdentification: {
1366
+ merchantTransactionId: payment.id,
1367
+ czechSymbols: {
1368
+ variableSymbol: payment.vs ?? (payment.ss ? void 0 : autoVariableSymbol(payment.id)),
1369
+ specificSymbol: payment.ss ?? void 0,
1370
+ constantSymbol: payment.ks ?? void 0
1371
+ }
1372
+ },
1373
+ amount: {
1374
+ value: payment.amount,
1375
+ currency: payment.currency ?? "CZK"
1376
+ },
1377
+ debtor: {
1378
+ ...debtorIban && {
1379
+ accountIdentification: { value: debtorIban, type: "IBAN" }
1380
+ },
1381
+ paymentProvider: this.PROVIDER
1382
+ },
1383
+ creditor: {
1384
+ accountIdentification: { value: creditorIban, type: "IBAN" },
1385
+ creditorName: payment.creditor.holderName.slice(0, 100)
1386
+ },
1387
+ ...unstructured && { remittanceInformation: { unstructured } },
1329
1388
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`,
1330
- // TEMP: clientId disabled per client request — do not send.
1331
- // clientId,
1332
- paymentProvider: this.PROVIDER,
1333
1389
  instructionPriority: toFinbricksPriority(payment.instructionPriority)
1334
1390
  }
1335
1391
  })
@@ -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" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
3283
+ data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "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: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
3659
+ data: "PROCESSING" | "BOOKED" | "REJECTED" | "PENDING" | "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: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4163
+ data: "AUTHORIZED" | "COMPLETED" | "OPENED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4164
4164
  driverParam: string;
4165
4165
  notNull: true;
4166
4166
  hasDefault: false;
@@ -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" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
3283
+ data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "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: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
3659
+ data: "PROCESSING" | "BOOKED" | "REJECTED" | "PENDING" | "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: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4163
+ data: "AUTHORIZED" | "COMPLETED" | "OPENED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4164
4164
  driverParam: string;
4165
4165
  notNull: true;
4166
4166
  hasDefault: false;
@@ -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" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
3283
+ data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "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: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
3659
+ data: "PROCESSING" | "BOOKED" | "REJECTED" | "PENDING" | "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: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4163
+ data: "AUTHORIZED" | "COMPLETED" | "OPENED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4164
4164
  driverParam: string;
4165
4165
  notNull: true;
4166
4166
  hasDefault: false;
package/dist/types.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const paymentDirection = require('./shared/bank.CKX4Wnq8.cjs');
3
+ const paymentDirection = require('./shared/bank.Bu_Hmsem.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,9 +1,9 @@
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';
1
+ import { BankAccountMetadata, BaseEvent } from '@develit-io/backend-sdk';
2
+ 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.r1xIlFBl.cjs';
3
+ 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.r1xIlFBl.cjs';
4
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.CRQln83_.cjs';
5
+ 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.CRQln83_.cjs';
5
6
  import { z } from 'zod';
6
- import { BaseEvent } from '@develit-io/backend-sdk';
7
7
  import * as drizzle_orm_zod from 'drizzle-orm/zod';
8
8
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
9
9
  export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
@@ -148,6 +148,52 @@ type FinbricksSepaPaymentBody = {
148
148
  instructionPriority?: 'NORM' | 'INST';
149
149
  callbackUrl: string;
150
150
  };
151
+ type FinbricksDomesticPaymentBody = {
152
+ merchantIdentification: {
153
+ merchantId: string;
154
+ clientId?: string;
155
+ };
156
+ paymentIdentification: {
157
+ merchantTransactionId: string;
158
+ endToEndIdentification?: string;
159
+ czechSymbols?: {
160
+ variableSymbol?: string;
161
+ specificSymbol?: string;
162
+ constantSymbol?: string;
163
+ };
164
+ };
165
+ amount: {
166
+ value: number;
167
+ currency: string;
168
+ };
169
+ debtor: {
170
+ accountIdentification?: {
171
+ value: string;
172
+ type: 'IBAN' | 'PHONE' | 'EMAIL' | 'TAXID';
173
+ };
174
+ debtorName?: string;
175
+ paymentProvider: FinbricksProvider;
176
+ };
177
+ creditor: {
178
+ accountIdentification: {
179
+ value: string;
180
+ type: 'IBAN' | 'PHONE' | 'EMAIL' | 'TAXID';
181
+ };
182
+ creditorName: string;
183
+ postalAddress?: {
184
+ streetName?: string;
185
+ buildingNumber?: string;
186
+ town?: string;
187
+ country?: string;
188
+ postalCode?: string;
189
+ };
190
+ };
191
+ remittanceInformation?: {
192
+ unstructured?: string;
193
+ };
194
+ instructionPriority?: 'NORM' | 'INST';
195
+ callbackUrl: string;
196
+ };
151
197
  type FinbricksForeignPaymentBody = {
152
198
  merchantIdentification: {
153
199
  merchantId: string;
@@ -288,6 +334,13 @@ declare abstract class FinbricksConnector extends IBankConnector {
288
334
  protected readonly finbricks: FinbricksClient;
289
335
  protected readonly PROVIDER: FinbricksProvider;
290
336
  constructor(provider: FinbricksProvider, { BASE_URI, MERCHANT_ID, PRIVATE_KEY_PEM, REDIRECT_URI, connectedAccounts, resolveCredentials, }: FinbricksConnectorConfig);
337
+ /**
338
+ * ČSOB mandates the UDT and we are an obliged entity, so a missing one must
339
+ * fail the payment — buildUltimateCreditor used to drop it silently instead.
340
+ */
341
+ protected assertUltimateCreditor(creditor: BankAccountMetadata, options: {
342
+ stripDiacritics: boolean;
343
+ }): void;
291
344
  private getClientId;
292
345
  getAuthUri({ ott }: {
293
346
  ott: string;
@@ -1330,4 +1383,4 @@ declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId
1330
1383
  declare function toBatchedPaymentFromPaymentRequest(sp: PaymentRequestSelectType): BatchedPayment;
1331
1384
 
1332
1385
  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 };
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 };
1386
+ export type { BankPaymentEvent, BankPaymentRequestEvent, DbuAccountConfig, DbuConnectorConfig, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksBatchBody, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectorConfig, FinbricksDomesticPaymentBody, 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,9 +1,9 @@
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';
1
+ import { BankAccountMetadata, BaseEvent } from '@develit-io/backend-sdk';
2
+ 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.r1xIlFBl.mjs';
3
+ 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.r1xIlFBl.mjs';
4
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.BW_2lyPj.mjs';
5
+ 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.BW_2lyPj.mjs';
5
6
  import { z } from 'zod';
6
- import { BaseEvent } from '@develit-io/backend-sdk';
7
7
  import * as drizzle_orm_zod from 'drizzle-orm/zod';
8
8
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
9
9
  export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
@@ -148,6 +148,52 @@ type FinbricksSepaPaymentBody = {
148
148
  instructionPriority?: 'NORM' | 'INST';
149
149
  callbackUrl: string;
150
150
  };
151
+ type FinbricksDomesticPaymentBody = {
152
+ merchantIdentification: {
153
+ merchantId: string;
154
+ clientId?: string;
155
+ };
156
+ paymentIdentification: {
157
+ merchantTransactionId: string;
158
+ endToEndIdentification?: string;
159
+ czechSymbols?: {
160
+ variableSymbol?: string;
161
+ specificSymbol?: string;
162
+ constantSymbol?: string;
163
+ };
164
+ };
165
+ amount: {
166
+ value: number;
167
+ currency: string;
168
+ };
169
+ debtor: {
170
+ accountIdentification?: {
171
+ value: string;
172
+ type: 'IBAN' | 'PHONE' | 'EMAIL' | 'TAXID';
173
+ };
174
+ debtorName?: string;
175
+ paymentProvider: FinbricksProvider;
176
+ };
177
+ creditor: {
178
+ accountIdentification: {
179
+ value: string;
180
+ type: 'IBAN' | 'PHONE' | 'EMAIL' | 'TAXID';
181
+ };
182
+ creditorName: string;
183
+ postalAddress?: {
184
+ streetName?: string;
185
+ buildingNumber?: string;
186
+ town?: string;
187
+ country?: string;
188
+ postalCode?: string;
189
+ };
190
+ };
191
+ remittanceInformation?: {
192
+ unstructured?: string;
193
+ };
194
+ instructionPriority?: 'NORM' | 'INST';
195
+ callbackUrl: string;
196
+ };
151
197
  type FinbricksForeignPaymentBody = {
152
198
  merchantIdentification: {
153
199
  merchantId: string;
@@ -288,6 +334,13 @@ declare abstract class FinbricksConnector extends IBankConnector {
288
334
  protected readonly finbricks: FinbricksClient;
289
335
  protected readonly PROVIDER: FinbricksProvider;
290
336
  constructor(provider: FinbricksProvider, { BASE_URI, MERCHANT_ID, PRIVATE_KEY_PEM, REDIRECT_URI, connectedAccounts, resolveCredentials, }: FinbricksConnectorConfig);
337
+ /**
338
+ * ČSOB mandates the UDT and we are an obliged entity, so a missing one must
339
+ * fail the payment — buildUltimateCreditor used to drop it silently instead.
340
+ */
341
+ protected assertUltimateCreditor(creditor: BankAccountMetadata, options: {
342
+ stripDiacritics: boolean;
343
+ }): void;
291
344
  private getClientId;
292
345
  getAuthUri({ ott }: {
293
346
  ott: string;
@@ -1330,4 +1383,4 @@ declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId
1330
1383
  declare function toBatchedPaymentFromPaymentRequest(sp: PaymentRequestSelectType): BatchedPayment;
1331
1384
 
1332
1385
  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 };
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 };
1386
+ export type { BankPaymentEvent, BankPaymentRequestEvent, DbuAccountConfig, DbuConnectorConfig, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksBatchBody, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectorConfig, FinbricksDomesticPaymentBody, 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,9 +1,9 @@
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';
1
+ import { BankAccountMetadata, BaseEvent } from '@develit-io/backend-sdk';
2
+ 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.r1xIlFBl.js';
3
+ 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.r1xIlFBl.js';
4
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.Cu_7g0PZ.js';
5
+ 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.Cu_7g0PZ.js';
5
6
  import { z } from 'zod';
6
- import { BaseEvent } from '@develit-io/backend-sdk';
7
7
  import * as drizzle_orm_zod from 'drizzle-orm/zod';
8
8
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
9
9
  export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
@@ -148,6 +148,52 @@ type FinbricksSepaPaymentBody = {
148
148
  instructionPriority?: 'NORM' | 'INST';
149
149
  callbackUrl: string;
150
150
  };
151
+ type FinbricksDomesticPaymentBody = {
152
+ merchantIdentification: {
153
+ merchantId: string;
154
+ clientId?: string;
155
+ };
156
+ paymentIdentification: {
157
+ merchantTransactionId: string;
158
+ endToEndIdentification?: string;
159
+ czechSymbols?: {
160
+ variableSymbol?: string;
161
+ specificSymbol?: string;
162
+ constantSymbol?: string;
163
+ };
164
+ };
165
+ amount: {
166
+ value: number;
167
+ currency: string;
168
+ };
169
+ debtor: {
170
+ accountIdentification?: {
171
+ value: string;
172
+ type: 'IBAN' | 'PHONE' | 'EMAIL' | 'TAXID';
173
+ };
174
+ debtorName?: string;
175
+ paymentProvider: FinbricksProvider;
176
+ };
177
+ creditor: {
178
+ accountIdentification: {
179
+ value: string;
180
+ type: 'IBAN' | 'PHONE' | 'EMAIL' | 'TAXID';
181
+ };
182
+ creditorName: string;
183
+ postalAddress?: {
184
+ streetName?: string;
185
+ buildingNumber?: string;
186
+ town?: string;
187
+ country?: string;
188
+ postalCode?: string;
189
+ };
190
+ };
191
+ remittanceInformation?: {
192
+ unstructured?: string;
193
+ };
194
+ instructionPriority?: 'NORM' | 'INST';
195
+ callbackUrl: string;
196
+ };
151
197
  type FinbricksForeignPaymentBody = {
152
198
  merchantIdentification: {
153
199
  merchantId: string;
@@ -288,6 +334,13 @@ declare abstract class FinbricksConnector extends IBankConnector {
288
334
  protected readonly finbricks: FinbricksClient;
289
335
  protected readonly PROVIDER: FinbricksProvider;
290
336
  constructor(provider: FinbricksProvider, { BASE_URI, MERCHANT_ID, PRIVATE_KEY_PEM, REDIRECT_URI, connectedAccounts, resolveCredentials, }: FinbricksConnectorConfig);
337
+ /**
338
+ * ČSOB mandates the UDT and we are an obliged entity, so a missing one must
339
+ * fail the payment — buildUltimateCreditor used to drop it silently instead.
340
+ */
341
+ protected assertUltimateCreditor(creditor: BankAccountMetadata, options: {
342
+ stripDiacritics: boolean;
343
+ }): void;
291
344
  private getClientId;
292
345
  getAuthUri({ ott }: {
293
346
  ott: string;
@@ -1330,4 +1383,4 @@ declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId
1330
1383
  declare function toBatchedPaymentFromPaymentRequest(sp: PaymentRequestSelectType): BatchedPayment;
1331
1384
 
1332
1385
  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 };
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 };
1386
+ export type { BankPaymentEvent, BankPaymentRequestEvent, DbuAccountConfig, DbuConnectorConfig, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksBatchBody, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectorConfig, FinbricksDomesticPaymentBody, 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.CyI5L9Lw.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.DfTsWbsY.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.2",
3
+ "version": "6.1.4",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {