@develit-services/bank 5.4.0 → 5.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/base.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const backendSdk = require('@develit-io/backend-sdk');
4
- const bank = require('./shared/bank.DRlIUffV.cjs');
4
+ const bank = require('./shared/bank.3A2oRRgQ.cjs');
5
5
  const drizzleOrm = require('drizzle-orm');
6
6
  const cloudflare_workers = require('cloudflare:workers');
7
7
  const d1 = require('drizzle-orm/d1');
@@ -11,7 +11,7 @@ const database_schema = require('./shared/bank.9Yw4KHyl.cjs');
11
11
  const generalCodes = require('@develit-io/general-codes');
12
12
  require('date-fns');
13
13
  require('node:crypto');
14
- const credentialsResolver = require('./shared/bank.UnkEmrVs.cjs');
14
+ const credentialsResolver = require('./shared/bank.C_IudwLH.cjs');
15
15
  require('drizzle-orm/zod');
16
16
  require('drizzle-orm/sqlite-core');
17
17
 
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.BxI2mvWk.cjs';
2
- import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.DBt9tdX9.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.BrBu52ls.cjs';
2
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.Dzk9ABBs.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";
2703
2702
  createdAt: "createdAt";
2704
2703
  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";
2714
2715
  PROCESSING: "PROCESSING";
2715
2716
  READY_TO_SIGN: "READY_TO_SIGN";
2716
- COMPLETED: "COMPLETED";
2717
2717
  FAILED: "FAILED";
2718
2718
  }>, z.ZodArray<z.ZodEnum<{
2719
2719
  AUTHORIZED: "AUTHORIZED";
2720
+ COMPLETED: "COMPLETED";
2720
2721
  PROCESSING: "PROCESSING";
2721
2722
  READY_TO_SIGN: "READY_TO_SIGN";
2722
- COMPLETED: "COMPLETED";
2723
2723
  FAILED: "FAILED";
2724
2724
  }>>]>>;
2725
2725
  }, z.core.$strip>;
@@ -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";
2828
2829
  createdAt: "createdAt";
2829
2830
  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";
2959
2961
  PROCESSING: "PROCESSING";
2960
2962
  PENDING: "PENDING";
2961
- BOOKED: "BOOKED";
2962
2963
  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";
2968
2970
  PROCESSING: "PROCESSING";
2969
2971
  PENDING: "PENDING";
2970
- BOOKED: "BOOKED";
2971
2972
  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";
3878
3879
  createdAt: "createdAt";
3879
3880
  updatedAt: "updatedAt";
3880
- amount: "amount";
3881
3881
  }>;
3882
3882
  direction: z.ZodEnum<{
3883
3883
  asc: "asc";
@@ -3886,20 +3886,20 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3886
3886
  }, z.core.$strip>;
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
+ OPENED: "OPENED";
3889
3890
  AUTHORIZED: "AUTHORIZED";
3890
3891
  COMPLETED: "COMPLETED";
3891
3892
  BOOKED: "BOOKED";
3892
- REJECTED: "REJECTED";
3893
- OPENED: "OPENED";
3894
3893
  SETTLED: "SETTLED";
3894
+ REJECTED: "REJECTED";
3895
3895
  CLOSED: "CLOSED";
3896
3896
  }>, z.ZodArray<z.ZodEnum<{
3897
+ OPENED: "OPENED";
3897
3898
  AUTHORIZED: "AUTHORIZED";
3898
3899
  COMPLETED: "COMPLETED";
3899
3900
  BOOKED: "BOOKED";
3900
- REJECTED: "REJECTED";
3901
- OPENED: "OPENED";
3902
3901
  SETTLED: "SETTLED";
3902
+ REJECTED: "REJECTED";
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.BxI2mvWk.mjs';
2
- import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.C3e_tQ9U.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.BrBu52ls.mjs';
2
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.o3KC69CF.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";
2703
2702
  createdAt: "createdAt";
2704
2703
  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";
2714
2715
  PROCESSING: "PROCESSING";
2715
2716
  READY_TO_SIGN: "READY_TO_SIGN";
2716
- COMPLETED: "COMPLETED";
2717
2717
  FAILED: "FAILED";
2718
2718
  }>, z.ZodArray<z.ZodEnum<{
2719
2719
  AUTHORIZED: "AUTHORIZED";
2720
+ COMPLETED: "COMPLETED";
2720
2721
  PROCESSING: "PROCESSING";
2721
2722
  READY_TO_SIGN: "READY_TO_SIGN";
2722
- COMPLETED: "COMPLETED";
2723
2723
  FAILED: "FAILED";
2724
2724
  }>>]>>;
2725
2725
  }, z.core.$strip>;
@@ -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";
2828
2829
  createdAt: "createdAt";
2829
2830
  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";
2959
2961
  PROCESSING: "PROCESSING";
2960
2962
  PENDING: "PENDING";
2961
- BOOKED: "BOOKED";
2962
2963
  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";
2968
2970
  PROCESSING: "PROCESSING";
2969
2971
  PENDING: "PENDING";
2970
- BOOKED: "BOOKED";
2971
2972
  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";
3878
3879
  createdAt: "createdAt";
3879
3880
  updatedAt: "updatedAt";
3880
- amount: "amount";
3881
3881
  }>;
3882
3882
  direction: z.ZodEnum<{
3883
3883
  asc: "asc";
@@ -3886,20 +3886,20 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3886
3886
  }, z.core.$strip>;
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
+ OPENED: "OPENED";
3889
3890
  AUTHORIZED: "AUTHORIZED";
3890
3891
  COMPLETED: "COMPLETED";
3891
3892
  BOOKED: "BOOKED";
3892
- REJECTED: "REJECTED";
3893
- OPENED: "OPENED";
3894
3893
  SETTLED: "SETTLED";
3894
+ REJECTED: "REJECTED";
3895
3895
  CLOSED: "CLOSED";
3896
3896
  }>, z.ZodArray<z.ZodEnum<{
3897
+ OPENED: "OPENED";
3897
3898
  AUTHORIZED: "AUTHORIZED";
3898
3899
  COMPLETED: "COMPLETED";
3899
3900
  BOOKED: "BOOKED";
3900
- REJECTED: "REJECTED";
3901
- OPENED: "OPENED";
3902
3901
  SETTLED: "SETTLED";
3902
+ REJECTED: "REJECTED";
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.BxI2mvWk.js';
2
- import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.CjTUoXAs.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.BrBu52ls.js';
2
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.Cfz0frnc.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";
2703
2702
  createdAt: "createdAt";
2704
2703
  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";
2714
2715
  PROCESSING: "PROCESSING";
2715
2716
  READY_TO_SIGN: "READY_TO_SIGN";
2716
- COMPLETED: "COMPLETED";
2717
2717
  FAILED: "FAILED";
2718
2718
  }>, z.ZodArray<z.ZodEnum<{
2719
2719
  AUTHORIZED: "AUTHORIZED";
2720
+ COMPLETED: "COMPLETED";
2720
2721
  PROCESSING: "PROCESSING";
2721
2722
  READY_TO_SIGN: "READY_TO_SIGN";
2722
- COMPLETED: "COMPLETED";
2723
2723
  FAILED: "FAILED";
2724
2724
  }>>]>>;
2725
2725
  }, z.core.$strip>;
@@ -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";
2828
2829
  createdAt: "createdAt";
2829
2830
  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";
2959
2961
  PROCESSING: "PROCESSING";
2960
2962
  PENDING: "PENDING";
2961
- BOOKED: "BOOKED";
2962
2963
  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";
2968
2970
  PROCESSING: "PROCESSING";
2969
2971
  PENDING: "PENDING";
2970
- BOOKED: "BOOKED";
2971
2972
  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";
3878
3879
  createdAt: "createdAt";
3879
3880
  updatedAt: "updatedAt";
3880
- amount: "amount";
3881
3881
  }>;
3882
3882
  direction: z.ZodEnum<{
3883
3883
  asc: "asc";
@@ -3886,20 +3886,20 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3886
3886
  }, z.core.$strip>;
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
+ OPENED: "OPENED";
3889
3890
  AUTHORIZED: "AUTHORIZED";
3890
3891
  COMPLETED: "COMPLETED";
3891
3892
  BOOKED: "BOOKED";
3892
- REJECTED: "REJECTED";
3893
- OPENED: "OPENED";
3894
3893
  SETTLED: "SETTLED";
3894
+ REJECTED: "REJECTED";
3895
3895
  CLOSED: "CLOSED";
3896
3896
  }>, z.ZodArray<z.ZodEnum<{
3897
+ OPENED: "OPENED";
3897
3898
  AUTHORIZED: "AUTHORIZED";
3898
3899
  COMPLETED: "COMPLETED";
3899
3900
  BOOKED: "BOOKED";
3900
- REJECTED: "REJECTED";
3901
- OPENED: "OPENED";
3902
3901
  SETTLED: "SETTLED";
3902
+ REJECTED: "REJECTED";
3903
3903
  CLOSED: "CLOSED";
3904
3904
  }>>]>>;
3905
3905
  filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
package/dist/base.mjs CHANGED
@@ -1,5 +1,5 @@
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, J as initiateConnector, 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.Bzl0ao-B.mjs';
2
+ import { G as tables, g as accountInsertSchema, H as relations, J as initiateConnector, 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.BqLdCHnj.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';
@@ -9,7 +9,7 @@ import { I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, g as PAYMENT_TYPES, b
9
9
  import { CURRENCY_CODES } from '@develit-io/general-codes';
10
10
  import 'date-fns';
11
11
  import 'node:crypto';
12
- import { h as encrypt, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, i as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from './shared/bank.Dl0FfB4s.mjs';
12
+ import { h as encrypt, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, i as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from './shared/bank.CtxJ_SOF.mjs';
13
13
  import 'drizzle-orm/zod';
14
14
  import 'drizzle-orm/sqlite-core';
15
15
 
@@ -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.BxI2mvWk.cjs';
1
+ export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.BrBu52ls.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.BxI2mvWk.mjs';
1
+ export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.BrBu52ls.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.BxI2mvWk.js';
1
+ export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.BrBu52ls.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 bank = require('../shared/bank.DRlIUffV.cjs');
4
+ const bank = require('../shared/bank.3A2oRRgQ.cjs');
5
5
  const batchLifecycle = require('../shared/bank.NF8bZBy0.cjs');
6
6
  const drizzleOrm = require('drizzle-orm');
7
- const credentialsResolver = require('../shared/bank.UnkEmrVs.cjs');
7
+ const credentialsResolver = require('../shared/bank.C_IudwLH.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');
@@ -31,6 +31,36 @@ const updateAccountLastSyncCommand = (db, {
31
31
  };
32
32
  };
33
33
 
34
+ const PAYMENT_ID_NAMESPACE = "7c9e6679-7425-40de-944b-e07fc1f90ae7";
35
+ const toHex = (bytes) => [...bytes].map((b) => b.toString(16).padStart(2, "0")).join("");
36
+ const deriveV4PaymentId = async (payment) => {
37
+ const name = `${PAYMENT_ID_NAMESPACE}:${payment.connectorKey}:${payment.accountId}:${payment.bankRefId}`;
38
+ const digest = await crypto.subtle.digest(
39
+ "SHA-256",
40
+ new TextEncoder().encode(name)
41
+ );
42
+ const bytes = new Uint8Array(digest).slice(0, 16);
43
+ bytes[6] = bytes[6] & 15 | 64;
44
+ bytes[8] = bytes[8] & 63 | 128;
45
+ const hex = toHex(bytes);
46
+ return [
47
+ hex.slice(0, 8),
48
+ hex.slice(8, 12),
49
+ hex.slice(12, 16),
50
+ hex.slice(16, 20),
51
+ hex.slice(20, 32)
52
+ ].join("-");
53
+ };
54
+
55
+ const LAST_SYNC_BANK_REF_IDS_CAP = 2e3;
56
+ const mergeLastSyncBankRefIds = (previous, incoming, cap = LAST_SYNC_BANK_REF_IDS_CAP) => {
57
+ const merged = [
58
+ ...previous,
59
+ ...incoming.filter((id) => id != null)
60
+ ];
61
+ return [...new Set(merged)].slice(-cap);
62
+ };
63
+
34
64
  async function pushToQueue$1(queue, message) {
35
65
  if (!Array.isArray(message)) {
36
66
  await queue.send(message, { contentType: "v8" });
@@ -384,7 +414,22 @@ class BankSyncAccountPayments extends cloudflare_workers.WorkflowEntrypoint {
384
414
  connectorKey: account.connectorKey,
385
415
  paymentsCount: result.length
386
416
  });
387
- return result;
417
+ const identifiable = result.filter(
418
+ (p) => p.parsed.bankRefId?.trim()
419
+ );
420
+ const skipped = result.length - identifiable.length;
421
+ if (skipped > 0) {
422
+ logger.warn("payments.fetch.skipped_blank_bank_ref", {
423
+ accountId,
424
+ connectorKey: account.connectorKey,
425
+ skipped
426
+ });
427
+ }
428
+ return Promise.all(
429
+ identifiable.map(async (p) => ({
430
+ parsed: { ...p.parsed, id: await deriveV4PaymentId(p.parsed) }
431
+ }))
432
+ );
388
433
  } catch (err) {
389
434
  const message = err instanceof Error ? err.message : typeof err === "object" && err !== null && "message" in err ? String(err.message) : JSON.stringify(err);
390
435
  logger.error("payments.fetch.failed", {
@@ -461,6 +506,10 @@ class BankSyncAccountPayments extends cloudflare_workers.WorkflowEntrypoint {
461
506
  metadata: {
462
507
  correlationId: p.parsed.correlationId,
463
508
  entityId: p.parsed.id,
509
+ // DBUGS-397: keep distinct statuses idempotency-independent —
510
+ // jobId = entityId-eventSignal-status, so BOOKED re-syncs collapse
511
+ // while a later REJECTED for the same payment still processes.
512
+ idempotencySuffix: p.parsed.status,
464
513
  timestamp: /* @__PURE__ */ new Date()
465
514
  }
466
515
  }))
@@ -469,7 +518,12 @@ class BankSyncAccountPayments extends cloudflare_workers.WorkflowEntrypoint {
469
518
  payments: payments.length,
470
519
  paymentsToProcess: paymentsToProcess.length,
471
520
  paymentsInserted: paymentsToInsert.length,
472
- lastSyncBankRefIds: paymentsToProcess.filter((p) => p.parsed.status === "BOOKED").map((p) => p.parsed.bankRefId),
521
+ // DBUGS-397: accumulate (don't overwrite) so a zero/partial sync
522
+ // can't empty the dedup window and re-emit recent payments.
523
+ lastSyncBankRefIds: mergeLastSyncBankRefIds(
524
+ lastSyncBankRefIds,
525
+ paymentsToProcess.filter((p) => p.parsed.status === "BOOKED").map((p) => p.parsed.bankRefId)
526
+ ),
473
527
  lastSyncPayments: lastSyncBankRefIds.length,
474
528
  eventsEmitted: eventsToEmit.length,
475
529
  iterationCount: getStepCount(ctx),
@@ -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, J as initiateConnector, m as isPaymentCompleted } from '../shared/bank.Bzl0ao-B.mjs';
2
+ import { G as tables, H as relations, v as toBatchedPaymentFromPaymentRequest, z as toPreparedPayment, J as initiateConnector, m as isPaymentCompleted } from '../shared/bank.BqLdCHnj.mjs';
3
3
  import { i as isBatchAuthorized, b as isBatchFailed, d as isBatchProcessing } from '../shared/bank.XqSw509X.mjs';
4
4
  import { eq, and, inArray } from 'drizzle-orm';
5
- import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.Dl0FfB4s.mjs';
5
+ import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.CtxJ_SOF.mjs';
6
6
  import { WorkflowEntrypoint } from 'cloudflare:workers';
7
7
  import { NonRetryableError } from 'cloudflare:workflows';
8
8
  import { drizzle } from 'drizzle-orm/d1';
@@ -29,6 +29,36 @@ const updateAccountLastSyncCommand = (db, {
29
29
  };
30
30
  };
31
31
 
32
+ const PAYMENT_ID_NAMESPACE = "7c9e6679-7425-40de-944b-e07fc1f90ae7";
33
+ const toHex = (bytes) => [...bytes].map((b) => b.toString(16).padStart(2, "0")).join("");
34
+ const deriveV4PaymentId = async (payment) => {
35
+ const name = `${PAYMENT_ID_NAMESPACE}:${payment.connectorKey}:${payment.accountId}:${payment.bankRefId}`;
36
+ const digest = await crypto.subtle.digest(
37
+ "SHA-256",
38
+ new TextEncoder().encode(name)
39
+ );
40
+ const bytes = new Uint8Array(digest).slice(0, 16);
41
+ bytes[6] = bytes[6] & 15 | 64;
42
+ bytes[8] = bytes[8] & 63 | 128;
43
+ const hex = toHex(bytes);
44
+ return [
45
+ hex.slice(0, 8),
46
+ hex.slice(8, 12),
47
+ hex.slice(12, 16),
48
+ hex.slice(16, 20),
49
+ hex.slice(20, 32)
50
+ ].join("-");
51
+ };
52
+
53
+ const LAST_SYNC_BANK_REF_IDS_CAP = 2e3;
54
+ const mergeLastSyncBankRefIds = (previous, incoming, cap = LAST_SYNC_BANK_REF_IDS_CAP) => {
55
+ const merged = [
56
+ ...previous,
57
+ ...incoming.filter((id) => id != null)
58
+ ];
59
+ return [...new Set(merged)].slice(-cap);
60
+ };
61
+
32
62
  async function pushToQueue$1(queue, message) {
33
63
  if (!Array.isArray(message)) {
34
64
  await queue.send(message, { contentType: "v8" });
@@ -382,7 +412,22 @@ class BankSyncAccountPayments extends WorkflowEntrypoint {
382
412
  connectorKey: account.connectorKey,
383
413
  paymentsCount: result.length
384
414
  });
385
- return result;
415
+ const identifiable = result.filter(
416
+ (p) => p.parsed.bankRefId?.trim()
417
+ );
418
+ const skipped = result.length - identifiable.length;
419
+ if (skipped > 0) {
420
+ logger.warn("payments.fetch.skipped_blank_bank_ref", {
421
+ accountId,
422
+ connectorKey: account.connectorKey,
423
+ skipped
424
+ });
425
+ }
426
+ return Promise.all(
427
+ identifiable.map(async (p) => ({
428
+ parsed: { ...p.parsed, id: await deriveV4PaymentId(p.parsed) }
429
+ }))
430
+ );
386
431
  } catch (err) {
387
432
  const message = err instanceof Error ? err.message : typeof err === "object" && err !== null && "message" in err ? String(err.message) : JSON.stringify(err);
388
433
  logger.error("payments.fetch.failed", {
@@ -459,6 +504,10 @@ class BankSyncAccountPayments extends WorkflowEntrypoint {
459
504
  metadata: {
460
505
  correlationId: p.parsed.correlationId,
461
506
  entityId: p.parsed.id,
507
+ // DBUGS-397: keep distinct statuses idempotency-independent —
508
+ // jobId = entityId-eventSignal-status, so BOOKED re-syncs collapse
509
+ // while a later REJECTED for the same payment still processes.
510
+ idempotencySuffix: p.parsed.status,
462
511
  timestamp: /* @__PURE__ */ new Date()
463
512
  }
464
513
  }))
@@ -467,7 +516,12 @@ class BankSyncAccountPayments extends WorkflowEntrypoint {
467
516
  payments: payments.length,
468
517
  paymentsToProcess: paymentsToProcess.length,
469
518
  paymentsInserted: paymentsToInsert.length,
470
- lastSyncBankRefIds: paymentsToProcess.filter((p) => p.parsed.status === "BOOKED").map((p) => p.parsed.bankRefId),
519
+ // DBUGS-397: accumulate (don't overwrite) so a zero/partial sync
520
+ // can't empty the dedup window and re-emit recent payments.
521
+ lastSyncBankRefIds: mergeLastSyncBankRefIds(
522
+ lastSyncBankRefIds,
523
+ paymentsToProcess.filter((p) => p.parsed.status === "BOOKED").map((p) => p.parsed.bankRefId)
524
+ ),
471
525
  lastSyncPayments: lastSyncBankRefIds.length,
472
526
  eventsEmitted: eventsToEmit.length,
473
527
  iterationCount: getStepCount(ctx),
@@ -774,6 +774,20 @@ function resolveAccountIdentification(account, currency) {
774
774
  message: "Account has neither IBAN nor account number \u2014 cannot identify for foreign payment"
775
775
  });
776
776
  }
777
+ function resolveCzechDomesticIban(account) {
778
+ if (!account.number || !account.bankCode) {
779
+ return account.iban;
780
+ }
781
+ const derived = calculateCzechIban(account.number, account.bankCode);
782
+ if (account.iban && account.iban !== derived) {
783
+ throw backendSdk.createInternalError(null, {
784
+ status: 422,
785
+ code: "VALID-B-017",
786
+ message: `Czech account ${account.number}/${account.bankCode} derives IBAN ${derived}, which conflicts with the stored IBAN ${account.iban}. Refusing to guess which is correct.`
787
+ });
788
+ }
789
+ return derived;
790
+ }
777
791
  function mapToFinbricksAddress(addr) {
778
792
  if (!addr) return void 0;
779
793
  return {
@@ -997,22 +1011,22 @@ class FinbricksConnector extends IBankConnector {
997
1011
  body: {
998
1012
  batchPaymentIdentification: {
999
1013
  merchantId: this.finbricks.MERCHANT_ID,
1000
- debtorAccountIban: payments[0].debtor.iban,
1014
+ debtorAccountIban: resolveCzechDomesticIban(payments[0].debtor),
1001
1015
  clientId,
1002
1016
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=batch&batchId=${batchId}`,
1003
1017
  merchantBatchId: batchId
1004
1018
  },
1005
1019
  payments: payments.map((p) => ({
1006
1020
  merchantTransactionId: p.id,
1007
- creditorAccountIban: p.creditor.iban,
1021
+ creditorAccountIban: resolveCzechDomesticIban(p.creditor),
1008
1022
  amount: p.amount,
1009
1023
  variableSymbol: p.vs ?? (p.ss ? void 0 : autoVariableSymbol(p.id)),
1010
1024
  specificSymbol: p.ss,
1011
1025
  constantSymbol: p.ks,
1012
1026
  description: this.PROVIDER === "CSOB" ? composeWithUltimateCreditor(p.message, p.creditor, {
1013
1027
  stripDiacritics: p.currency !== "CZK"
1014
- }) : p.message
1015
- // instructionPriority: 'NORM', todo(kleinpetr): pass payment priority
1028
+ }) : p.message,
1029
+ instructionPriority: p.instructionPriority ?? "NORM"
1016
1030
  }))
1017
1031
  }
1018
1032
  })
@@ -1193,8 +1207,8 @@ class FinbricksConnector extends IBankConnector {
1193
1207
  merchantId: this.finbricks.MERCHANT_ID,
1194
1208
  merchantTransactionId: payment.id,
1195
1209
  totalPrice: payment.amount,
1196
- debtorAccountIban: payment.debtor.iban,
1197
- creditorAccountIban: payment.creditor.iban,
1210
+ debtorAccountIban: resolveCzechDomesticIban(payment.debtor),
1211
+ creditorAccountIban: resolveCzechDomesticIban(payment.creditor),
1198
1212
  creditorName: payment.creditor.holderName,
1199
1213
  description: this.PROVIDER === "CSOB" ? composeWithUltimateCreditor(payment.message, payment.creditor, {
1200
1214
  stripDiacritics: payment.currency !== "CZK"
@@ -1203,7 +1217,8 @@ class FinbricksConnector extends IBankConnector {
1203
1217
  specificSymbol: payment.ss,
1204
1218
  constantSymbol: payment.ks,
1205
1219
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`,
1206
- paymentProvider: this.PROVIDER
1220
+ paymentProvider: this.PROVIDER,
1221
+ instructionPriority: payment.instructionPriority ?? "NORM"
1207
1222
  }
1208
1223
  })
1209
1224
  );
@@ -2071,7 +2086,9 @@ class ErsteConnector extends IBankConnector {
2071
2086
  }),
2072
2087
  instructionIdentification: payment.id
2073
2088
  },
2074
- paymentTypeInformation: { instructionPriority: "NORM" },
2089
+ paymentTypeInformation: {
2090
+ instructionPriority: payment.instructionPriority ?? "NORM"
2091
+ },
2075
2092
  amount: {
2076
2093
  instructedAmount: { value: payment.amount, currency: payment.currency }
2077
2094
  },
@@ -772,6 +772,20 @@ function resolveAccountIdentification(account, currency) {
772
772
  message: "Account has neither IBAN nor account number \u2014 cannot identify for foreign payment"
773
773
  });
774
774
  }
775
+ function resolveCzechDomesticIban(account) {
776
+ if (!account.number || !account.bankCode) {
777
+ return account.iban;
778
+ }
779
+ const derived = calculateCzechIban(account.number, account.bankCode);
780
+ if (account.iban && account.iban !== derived) {
781
+ throw createInternalError(null, {
782
+ status: 422,
783
+ code: "VALID-B-017",
784
+ message: `Czech account ${account.number}/${account.bankCode} derives IBAN ${derived}, which conflicts with the stored IBAN ${account.iban}. Refusing to guess which is correct.`
785
+ });
786
+ }
787
+ return derived;
788
+ }
775
789
  function mapToFinbricksAddress(addr) {
776
790
  if (!addr) return void 0;
777
791
  return {
@@ -995,22 +1009,22 @@ class FinbricksConnector extends IBankConnector {
995
1009
  body: {
996
1010
  batchPaymentIdentification: {
997
1011
  merchantId: this.finbricks.MERCHANT_ID,
998
- debtorAccountIban: payments[0].debtor.iban,
1012
+ debtorAccountIban: resolveCzechDomesticIban(payments[0].debtor),
999
1013
  clientId,
1000
1014
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=batch&batchId=${batchId}`,
1001
1015
  merchantBatchId: batchId
1002
1016
  },
1003
1017
  payments: payments.map((p) => ({
1004
1018
  merchantTransactionId: p.id,
1005
- creditorAccountIban: p.creditor.iban,
1019
+ creditorAccountIban: resolveCzechDomesticIban(p.creditor),
1006
1020
  amount: p.amount,
1007
1021
  variableSymbol: p.vs ?? (p.ss ? void 0 : autoVariableSymbol(p.id)),
1008
1022
  specificSymbol: p.ss,
1009
1023
  constantSymbol: p.ks,
1010
1024
  description: this.PROVIDER === "CSOB" ? composeWithUltimateCreditor(p.message, p.creditor, {
1011
1025
  stripDiacritics: p.currency !== "CZK"
1012
- }) : p.message
1013
- // instructionPriority: 'NORM', todo(kleinpetr): pass payment priority
1026
+ }) : p.message,
1027
+ instructionPriority: p.instructionPriority ?? "NORM"
1014
1028
  }))
1015
1029
  }
1016
1030
  })
@@ -1191,8 +1205,8 @@ class FinbricksConnector extends IBankConnector {
1191
1205
  merchantId: this.finbricks.MERCHANT_ID,
1192
1206
  merchantTransactionId: payment.id,
1193
1207
  totalPrice: payment.amount,
1194
- debtorAccountIban: payment.debtor.iban,
1195
- creditorAccountIban: payment.creditor.iban,
1208
+ debtorAccountIban: resolveCzechDomesticIban(payment.debtor),
1209
+ creditorAccountIban: resolveCzechDomesticIban(payment.creditor),
1196
1210
  creditorName: payment.creditor.holderName,
1197
1211
  description: this.PROVIDER === "CSOB" ? composeWithUltimateCreditor(payment.message, payment.creditor, {
1198
1212
  stripDiacritics: payment.currency !== "CZK"
@@ -1201,7 +1215,8 @@ class FinbricksConnector extends IBankConnector {
1201
1215
  specificSymbol: payment.ss,
1202
1216
  constantSymbol: payment.ks,
1203
1217
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`,
1204
- paymentProvider: this.PROVIDER
1218
+ paymentProvider: this.PROVIDER,
1219
+ instructionPriority: payment.instructionPriority ?? "NORM"
1205
1220
  }
1206
1221
  })
1207
1222
  );
@@ -2069,7 +2084,9 @@ class ErsteConnector extends IBankConnector {
2069
2084
  }),
2070
2085
  instructionIdentification: payment.id
2071
2086
  },
2072
- paymentTypeInformation: { instructionPriority: "NORM" },
2087
+ paymentTypeInformation: {
2088
+ instructionPriority: payment.instructionPriority ?? "NORM"
2089
+ },
2073
2090
  amount: {
2074
2091
  instructedAmount: { value: payment.amount, currency: payment.currency }
2075
2092
  },
@@ -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" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
3233
+ data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "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: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
3609
+ data: "BOOKED" | "REJECTED" | "PROCESSING" | "PENDING" | "CANCELLED" | "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" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
4113
+ data: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4114
4114
  driverParam: string;
4115
4115
  notNull: true;
4116
4116
  hasDefault: false;
@@ -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" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
3233
+ data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "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: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
3609
+ data: "BOOKED" | "REJECTED" | "PROCESSING" | "PENDING" | "CANCELLED" | "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" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
4113
+ data: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4114
4114
  driverParam: string;
4115
4115
  notNull: true;
4116
4116
  hasDefault: false;
@@ -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" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
3233
+ data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "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: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
3609
+ data: "BOOKED" | "REJECTED" | "PROCESSING" | "PENDING" | "CANCELLED" | "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" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
4113
+ data: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
4114
4114
  driverParam: string;
4115
4115
  notNull: true;
4116
4116
  hasDefault: false;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const drizzleOrm = require('drizzle-orm');
4
- const bank = require('./bank.DRlIUffV.cjs');
4
+ const bank = require('./bank.3A2oRRgQ.cjs');
5
5
  const backendSdk = require('@develit-io/backend-sdk');
6
6
  require('./bank.9Yw4KHyl.cjs');
7
7
  require('date-fns');
@@ -1,4 +1,4 @@
1
- import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.BxI2mvWk.js';
1
+ import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.BrBu52ls.js';
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 } from './bank.Bzl0ao-B.mjs';
2
+ import { G as tables } from './bank.BqLdCHnj.mjs';
3
3
  import { uuidv4 } from '@develit-io/backend-sdk';
4
4
  import './bank.BzDNLxB_.mjs';
5
5
  import 'date-fns';
@@ -1,4 +1,4 @@
1
- import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.BxI2mvWk.mjs';
1
+ import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.BrBu52ls.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.BxI2mvWk.cjs';
1
+ import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.BrBu52ls.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 bank = require('./shared/bank.DRlIUffV.cjs');
3
+ const bank = require('./shared/bank.3A2oRRgQ.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.BxI2mvWk.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.BxI2mvWk.cjs';
3
- import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.DBt9tdX9.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.DBt9tdX9.cjs';
1
+ import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.BrBu52ls.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.BrBu52ls.cjs';
3
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.Dzk9ABBs.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.Dzk9ABBs.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';
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.BxI2mvWk.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.BxI2mvWk.mjs';
3
- import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.C3e_tQ9U.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.C3e_tQ9U.mjs';
1
+ import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.BrBu52ls.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.BrBu52ls.mjs';
3
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.o3KC69CF.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.o3KC69CF.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';
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.BxI2mvWk.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.BxI2mvWk.js';
3
- import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.CjTUoXAs.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.CjTUoXAs.js';
1
+ import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.BrBu52ls.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.BrBu52ls.js';
3
+ import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.Cfz0frnc.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.Cfz0frnc.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';
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.Bzl0ao-B.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.BqLdCHnj.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.4.0",
3
+ "version": "5.4.2",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {