@develit-services/bank 4.3.0 → 4.4.0
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/database/schema.d.cts +1 -1
- package/dist/database/schema.d.mts +1 -1
- package/dist/database/schema.d.ts +1 -1
- package/dist/export/worker.cjs +2 -2
- package/dist/export/worker.d.cts +14 -14
- package/dist/export/worker.d.mts +14 -14
- package/dist/export/worker.d.ts +14 -14
- package/dist/export/worker.mjs +2 -2
- package/dist/export/workflows.cjs +2 -2
- package/dist/export/workflows.mjs +2 -2
- package/dist/shared/{bank.d4sMg6i0.d.ts → bank.BCqBwSKC.d.cts} +3 -3
- package/dist/shared/{bank.d4sMg6i0.d.cts → bank.BCqBwSKC.d.mts} +3 -3
- package/dist/shared/{bank.d4sMg6i0.d.mts → bank.BCqBwSKC.d.ts} +3 -3
- package/dist/shared/{bank.NjHGMD3j.cjs → bank.BSX82jhx.cjs} +67 -22
- package/dist/shared/{bank.DyueVCXo.mjs → bank.BdTj54NO.mjs} +1 -1
- package/dist/shared/{bank.B2FLbr0c.d.ts → bank.BmX_IG66.d.ts} +1 -1
- package/dist/shared/{bank.tefvLkrJ.d.mts → bank.BnCJmT6k.d.mts} +1 -1
- package/dist/shared/{bank.BmDlJzUz.mjs → bank.CZ8MQDPa.mjs} +67 -22
- package/dist/shared/{bank.C-XeuTid.cjs → bank.CibQRM2D.cjs} +1 -1
- package/dist/shared/{bank.CkSgCZ-W.d.cts → bank.mHFTrKBv.d.cts} +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.d.cts +4 -4
- package/dist/types.d.mts +4 -4
- package/dist/types.d.ts +4 -4
- package/dist/types.mjs +1 -1
- package/package.json +1 -1
|
@@ -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.
|
|
1
|
+
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.BCqBwSKC.cjs';
|
|
2
2
|
import 'drizzle-orm';
|
|
3
3
|
import 'drizzle-orm/sqlite-core';
|
|
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.
|
|
1
|
+
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.BCqBwSKC.mjs';
|
|
2
2
|
import 'drizzle-orm';
|
|
3
3
|
import 'drizzle-orm/sqlite-core';
|
|
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.
|
|
1
|
+
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.BCqBwSKC.js';
|
|
2
2
|
import 'drizzle-orm';
|
|
3
3
|
import 'drizzle-orm/sqlite-core';
|
|
4
4
|
import '@develit-io/general-codes';
|
package/dist/export/worker.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
|
-
const ott_zod = require('../shared/bank.
|
|
4
|
+
const ott_zod = require('../shared/bank.BSX82jhx.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.
|
|
14
|
+
const credentialsResolver = require('../shared/bank.CibQRM2D.cjs');
|
|
15
15
|
require('drizzle-orm/zod');
|
|
16
16
|
require('drizzle-orm/sqlite-core');
|
|
17
17
|
|
package/dist/export/worker.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as drizzle_orm from 'drizzle-orm';
|
|
2
|
-
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, b as ConfigEnvironmentBank, t as tables, c as ConnectorKey, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from '../shared/bank.
|
|
3
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.
|
|
2
|
+
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, b as ConfigEnvironmentBank, t as tables, c as ConnectorKey, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from '../shared/bank.BCqBwSKC.cjs';
|
|
3
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.mHFTrKBv.cjs';
|
|
4
4
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
5
5
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
6
6
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
@@ -2703,15 +2703,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2703
2703
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2704
2704
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2705
2705
|
AUTHORIZED: "AUTHORIZED";
|
|
2706
|
+
COMPLETED: "COMPLETED";
|
|
2706
2707
|
PROCESSING: "PROCESSING";
|
|
2707
2708
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2708
|
-
COMPLETED: "COMPLETED";
|
|
2709
2709
|
FAILED: "FAILED";
|
|
2710
2710
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2711
2711
|
AUTHORIZED: "AUTHORIZED";
|
|
2712
|
+
COMPLETED: "COMPLETED";
|
|
2712
2713
|
PROCESSING: "PROCESSING";
|
|
2713
2714
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2714
|
-
COMPLETED: "COMPLETED";
|
|
2715
2715
|
FAILED: "FAILED";
|
|
2716
2716
|
}>>]>>;
|
|
2717
2717
|
}, z.core.$strip>;
|
|
@@ -2948,20 +2948,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2948
2948
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2949
2949
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2950
2950
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2951
|
-
PROCESSING: "PROCESSING";
|
|
2952
|
-
PENDING: "PENDING";
|
|
2953
2951
|
BOOKED: "BOOKED";
|
|
2954
|
-
CANCELLED: "CANCELLED";
|
|
2955
2952
|
REJECTED: "REJECTED";
|
|
2953
|
+
PENDING: "PENDING";
|
|
2954
|
+
PROCESSING: "PROCESSING";
|
|
2955
|
+
CANCELLED: "CANCELLED";
|
|
2956
2956
|
SCHEDULED: "SCHEDULED";
|
|
2957
2957
|
HOLD: "HOLD";
|
|
2958
2958
|
INFO: "INFO";
|
|
2959
2959
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2960
|
-
PROCESSING: "PROCESSING";
|
|
2961
|
-
PENDING: "PENDING";
|
|
2962
2960
|
BOOKED: "BOOKED";
|
|
2963
|
-
CANCELLED: "CANCELLED";
|
|
2964
2961
|
REJECTED: "REJECTED";
|
|
2962
|
+
PENDING: "PENDING";
|
|
2963
|
+
PROCESSING: "PROCESSING";
|
|
2964
|
+
CANCELLED: "CANCELLED";
|
|
2965
2965
|
SCHEDULED: "SCHEDULED";
|
|
2966
2966
|
HOLD: "HOLD";
|
|
2967
2967
|
INFO: "INFO";
|
|
@@ -3597,19 +3597,19 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3597
3597
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3598
3598
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3599
3599
|
AUTHORIZED: "AUTHORIZED";
|
|
3600
|
+
OPENED: "OPENED";
|
|
3600
3601
|
COMPLETED: "COMPLETED";
|
|
3601
3602
|
BOOKED: "BOOKED";
|
|
3602
|
-
REJECTED: "REJECTED";
|
|
3603
|
-
OPENED: "OPENED";
|
|
3604
3603
|
SETTLED: "SETTLED";
|
|
3604
|
+
REJECTED: "REJECTED";
|
|
3605
3605
|
CLOSED: "CLOSED";
|
|
3606
3606
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3607
3607
|
AUTHORIZED: "AUTHORIZED";
|
|
3608
|
+
OPENED: "OPENED";
|
|
3608
3609
|
COMPLETED: "COMPLETED";
|
|
3609
3610
|
BOOKED: "BOOKED";
|
|
3610
|
-
REJECTED: "REJECTED";
|
|
3611
|
-
OPENED: "OPENED";
|
|
3612
3611
|
SETTLED: "SETTLED";
|
|
3612
|
+
REJECTED: "REJECTED";
|
|
3613
3613
|
CLOSED: "CLOSED";
|
|
3614
3614
|
}>>]>>;
|
|
3615
3615
|
filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
package/dist/export/worker.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as drizzle_orm from 'drizzle-orm';
|
|
2
|
-
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, b as ConfigEnvironmentBank, t as tables, c as ConnectorKey, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from '../shared/bank.
|
|
3
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.
|
|
2
|
+
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, b as ConfigEnvironmentBank, t as tables, c as ConnectorKey, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from '../shared/bank.BCqBwSKC.mjs';
|
|
3
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.BnCJmT6k.mjs';
|
|
4
4
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
5
5
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
6
6
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
@@ -2703,15 +2703,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2703
2703
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2704
2704
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2705
2705
|
AUTHORIZED: "AUTHORIZED";
|
|
2706
|
+
COMPLETED: "COMPLETED";
|
|
2706
2707
|
PROCESSING: "PROCESSING";
|
|
2707
2708
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2708
|
-
COMPLETED: "COMPLETED";
|
|
2709
2709
|
FAILED: "FAILED";
|
|
2710
2710
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2711
2711
|
AUTHORIZED: "AUTHORIZED";
|
|
2712
|
+
COMPLETED: "COMPLETED";
|
|
2712
2713
|
PROCESSING: "PROCESSING";
|
|
2713
2714
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2714
|
-
COMPLETED: "COMPLETED";
|
|
2715
2715
|
FAILED: "FAILED";
|
|
2716
2716
|
}>>]>>;
|
|
2717
2717
|
}, z.core.$strip>;
|
|
@@ -2948,20 +2948,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2948
2948
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2949
2949
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2950
2950
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2951
|
-
PROCESSING: "PROCESSING";
|
|
2952
|
-
PENDING: "PENDING";
|
|
2953
2951
|
BOOKED: "BOOKED";
|
|
2954
|
-
CANCELLED: "CANCELLED";
|
|
2955
2952
|
REJECTED: "REJECTED";
|
|
2953
|
+
PENDING: "PENDING";
|
|
2954
|
+
PROCESSING: "PROCESSING";
|
|
2955
|
+
CANCELLED: "CANCELLED";
|
|
2956
2956
|
SCHEDULED: "SCHEDULED";
|
|
2957
2957
|
HOLD: "HOLD";
|
|
2958
2958
|
INFO: "INFO";
|
|
2959
2959
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2960
|
-
PROCESSING: "PROCESSING";
|
|
2961
|
-
PENDING: "PENDING";
|
|
2962
2960
|
BOOKED: "BOOKED";
|
|
2963
|
-
CANCELLED: "CANCELLED";
|
|
2964
2961
|
REJECTED: "REJECTED";
|
|
2962
|
+
PENDING: "PENDING";
|
|
2963
|
+
PROCESSING: "PROCESSING";
|
|
2964
|
+
CANCELLED: "CANCELLED";
|
|
2965
2965
|
SCHEDULED: "SCHEDULED";
|
|
2966
2966
|
HOLD: "HOLD";
|
|
2967
2967
|
INFO: "INFO";
|
|
@@ -3597,19 +3597,19 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3597
3597
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3598
3598
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3599
3599
|
AUTHORIZED: "AUTHORIZED";
|
|
3600
|
+
OPENED: "OPENED";
|
|
3600
3601
|
COMPLETED: "COMPLETED";
|
|
3601
3602
|
BOOKED: "BOOKED";
|
|
3602
|
-
REJECTED: "REJECTED";
|
|
3603
|
-
OPENED: "OPENED";
|
|
3604
3603
|
SETTLED: "SETTLED";
|
|
3604
|
+
REJECTED: "REJECTED";
|
|
3605
3605
|
CLOSED: "CLOSED";
|
|
3606
3606
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3607
3607
|
AUTHORIZED: "AUTHORIZED";
|
|
3608
|
+
OPENED: "OPENED";
|
|
3608
3609
|
COMPLETED: "COMPLETED";
|
|
3609
3610
|
BOOKED: "BOOKED";
|
|
3610
|
-
REJECTED: "REJECTED";
|
|
3611
|
-
OPENED: "OPENED";
|
|
3612
3611
|
SETTLED: "SETTLED";
|
|
3612
|
+
REJECTED: "REJECTED";
|
|
3613
3613
|
CLOSED: "CLOSED";
|
|
3614
3614
|
}>>]>>;
|
|
3615
3615
|
filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
package/dist/export/worker.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as drizzle_orm from 'drizzle-orm';
|
|
2
|
-
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, b as ConfigEnvironmentBank, t as tables, c as ConnectorKey, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from '../shared/bank.
|
|
3
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.
|
|
2
|
+
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, b as ConfigEnvironmentBank, t as tables, c as ConnectorKey, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from '../shared/bank.BCqBwSKC.js';
|
|
3
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.BmX_IG66.js';
|
|
4
4
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
5
5
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
6
6
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
@@ -2703,15 +2703,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2703
2703
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2704
2704
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2705
2705
|
AUTHORIZED: "AUTHORIZED";
|
|
2706
|
+
COMPLETED: "COMPLETED";
|
|
2706
2707
|
PROCESSING: "PROCESSING";
|
|
2707
2708
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2708
|
-
COMPLETED: "COMPLETED";
|
|
2709
2709
|
FAILED: "FAILED";
|
|
2710
2710
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2711
2711
|
AUTHORIZED: "AUTHORIZED";
|
|
2712
|
+
COMPLETED: "COMPLETED";
|
|
2712
2713
|
PROCESSING: "PROCESSING";
|
|
2713
2714
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2714
|
-
COMPLETED: "COMPLETED";
|
|
2715
2715
|
FAILED: "FAILED";
|
|
2716
2716
|
}>>]>>;
|
|
2717
2717
|
}, z.core.$strip>;
|
|
@@ -2948,20 +2948,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2948
2948
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2949
2949
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2950
2950
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2951
|
-
PROCESSING: "PROCESSING";
|
|
2952
|
-
PENDING: "PENDING";
|
|
2953
2951
|
BOOKED: "BOOKED";
|
|
2954
|
-
CANCELLED: "CANCELLED";
|
|
2955
2952
|
REJECTED: "REJECTED";
|
|
2953
|
+
PENDING: "PENDING";
|
|
2954
|
+
PROCESSING: "PROCESSING";
|
|
2955
|
+
CANCELLED: "CANCELLED";
|
|
2956
2956
|
SCHEDULED: "SCHEDULED";
|
|
2957
2957
|
HOLD: "HOLD";
|
|
2958
2958
|
INFO: "INFO";
|
|
2959
2959
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2960
|
-
PROCESSING: "PROCESSING";
|
|
2961
|
-
PENDING: "PENDING";
|
|
2962
2960
|
BOOKED: "BOOKED";
|
|
2963
|
-
CANCELLED: "CANCELLED";
|
|
2964
2961
|
REJECTED: "REJECTED";
|
|
2962
|
+
PENDING: "PENDING";
|
|
2963
|
+
PROCESSING: "PROCESSING";
|
|
2964
|
+
CANCELLED: "CANCELLED";
|
|
2965
2965
|
SCHEDULED: "SCHEDULED";
|
|
2966
2966
|
HOLD: "HOLD";
|
|
2967
2967
|
INFO: "INFO";
|
|
@@ -3597,19 +3597,19 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3597
3597
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3598
3598
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3599
3599
|
AUTHORIZED: "AUTHORIZED";
|
|
3600
|
+
OPENED: "OPENED";
|
|
3600
3601
|
COMPLETED: "COMPLETED";
|
|
3601
3602
|
BOOKED: "BOOKED";
|
|
3602
|
-
REJECTED: "REJECTED";
|
|
3603
|
-
OPENED: "OPENED";
|
|
3604
3603
|
SETTLED: "SETTLED";
|
|
3604
|
+
REJECTED: "REJECTED";
|
|
3605
3605
|
CLOSED: "CLOSED";
|
|
3606
3606
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3607
3607
|
AUTHORIZED: "AUTHORIZED";
|
|
3608
|
+
OPENED: "OPENED";
|
|
3608
3609
|
COMPLETED: "COMPLETED";
|
|
3609
3610
|
BOOKED: "BOOKED";
|
|
3610
|
-
REJECTED: "REJECTED";
|
|
3611
|
-
OPENED: "OPENED";
|
|
3612
3611
|
SETTLED: "SETTLED";
|
|
3612
|
+
REJECTED: "REJECTED";
|
|
3613
3613
|
CLOSED: "CLOSED";
|
|
3614
3614
|
}>>]>>;
|
|
3615
3615
|
filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
package/dist/export/worker.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { bankAccountMetadataSchema, structuredAddressSchema, uuidv4, first, buildMultiFilterConditions as buildMultiFilterConditions$1, 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, j as assignAccount, u as toBatchedPayment, y as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from '../shared/bank.
|
|
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, j as assignAccount, u as toBatchedPayment, y as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from '../shared/bank.CZ8MQDPa.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.
|
|
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.BdTj54NO.mjs';
|
|
13
13
|
import 'drizzle-orm/zod';
|
|
14
14
|
import 'drizzle-orm/sqlite-core';
|
|
15
15
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
|
-
const ott_zod = require('../shared/bank.
|
|
4
|
+
const ott_zod = require('../shared/bank.BSX82jhx.cjs');
|
|
5
5
|
const batchLifecycle = require('../shared/bank.NF8bZBy0.cjs');
|
|
6
6
|
const drizzleOrm = require('drizzle-orm');
|
|
7
|
-
const credentialsResolver = require('../shared/bank.
|
|
7
|
+
const credentialsResolver = require('../shared/bank.CibQRM2D.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, J as initiateConnector, m as isPaymentCompleted } from '../shared/bank.
|
|
2
|
+
import { G as tables, H as relations, v as toBatchedPaymentFromPaymentRequest, z as toPreparedPayment, J as initiateConnector, m as isPaymentCompleted } from '../shared/bank.CZ8MQDPa.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.
|
|
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.BdTj54NO.mjs';
|
|
6
6
|
import { WorkflowEntrypoint } from 'cloudflare:workers';
|
|
7
7
|
import { NonRetryableError } from 'cloudflare:workflows';
|
|
8
8
|
import { drizzle } from 'drizzle-orm/d1';
|
|
@@ -2144,7 +2144,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2144
2144
|
name: string;
|
|
2145
2145
|
tableName: "batch";
|
|
2146
2146
|
dataType: "string enum";
|
|
2147
|
-
data: "AUTHORIZED" | "
|
|
2147
|
+
data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
|
|
2148
2148
|
driverParam: string;
|
|
2149
2149
|
notNull: false;
|
|
2150
2150
|
hasDefault: false;
|
|
@@ -2415,7 +2415,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2415
2415
|
name: string;
|
|
2416
2416
|
tableName: "payment";
|
|
2417
2417
|
dataType: "string enum";
|
|
2418
|
-
data: "
|
|
2418
|
+
data: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
2419
2419
|
driverParam: string;
|
|
2420
2420
|
notNull: true;
|
|
2421
2421
|
hasDefault: false;
|
|
@@ -2814,7 +2814,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2814
2814
|
name: string;
|
|
2815
2815
|
tableName: "payment_request";
|
|
2816
2816
|
dataType: "string enum";
|
|
2817
|
-
data: "AUTHORIZED" | "
|
|
2817
|
+
data: "AUTHORIZED" | "OPENED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
2818
2818
|
driverParam: string;
|
|
2819
2819
|
notNull: true;
|
|
2820
2820
|
hasDefault: false;
|
|
@@ -2144,7 +2144,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2144
2144
|
name: string;
|
|
2145
2145
|
tableName: "batch";
|
|
2146
2146
|
dataType: "string enum";
|
|
2147
|
-
data: "AUTHORIZED" | "
|
|
2147
|
+
data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
|
|
2148
2148
|
driverParam: string;
|
|
2149
2149
|
notNull: false;
|
|
2150
2150
|
hasDefault: false;
|
|
@@ -2415,7 +2415,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2415
2415
|
name: string;
|
|
2416
2416
|
tableName: "payment";
|
|
2417
2417
|
dataType: "string enum";
|
|
2418
|
-
data: "
|
|
2418
|
+
data: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
2419
2419
|
driverParam: string;
|
|
2420
2420
|
notNull: true;
|
|
2421
2421
|
hasDefault: false;
|
|
@@ -2814,7 +2814,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2814
2814
|
name: string;
|
|
2815
2815
|
tableName: "payment_request";
|
|
2816
2816
|
dataType: "string enum";
|
|
2817
|
-
data: "AUTHORIZED" | "
|
|
2817
|
+
data: "AUTHORIZED" | "OPENED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
2818
2818
|
driverParam: string;
|
|
2819
2819
|
notNull: true;
|
|
2820
2820
|
hasDefault: false;
|
|
@@ -2144,7 +2144,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2144
2144
|
name: string;
|
|
2145
2145
|
tableName: "batch";
|
|
2146
2146
|
dataType: "string enum";
|
|
2147
|
-
data: "AUTHORIZED" | "
|
|
2147
|
+
data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
|
|
2148
2148
|
driverParam: string;
|
|
2149
2149
|
notNull: false;
|
|
2150
2150
|
hasDefault: false;
|
|
@@ -2415,7 +2415,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2415
2415
|
name: string;
|
|
2416
2416
|
tableName: "payment";
|
|
2417
2417
|
dataType: "string enum";
|
|
2418
|
-
data: "
|
|
2418
|
+
data: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
2419
2419
|
driverParam: string;
|
|
2420
2420
|
notNull: true;
|
|
2421
2421
|
hasDefault: false;
|
|
@@ -2814,7 +2814,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2814
2814
|
name: string;
|
|
2815
2815
|
tableName: "payment_request";
|
|
2816
2816
|
dataType: "string enum";
|
|
2817
|
-
data: "AUTHORIZED" | "
|
|
2817
|
+
data: "AUTHORIZED" | "OPENED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
2818
2818
|
driverParam: string;
|
|
2819
2819
|
notNull: true;
|
|
2820
2820
|
hasDefault: false;
|
|
@@ -322,12 +322,40 @@ function toBatchedPaymentFromPaymentRequest(sp) {
|
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
+
const MAX_REFERENCE_LENGTH = 30;
|
|
326
|
+
function buildPaymentReference(symbols) {
|
|
327
|
+
const parts = [
|
|
328
|
+
symbols.vs && `VS${symbols.vs}`,
|
|
329
|
+
symbols.ss && `SS${symbols.ss}`,
|
|
330
|
+
symbols.ks && `KS${symbols.ks}`
|
|
331
|
+
].filter(Boolean);
|
|
332
|
+
return parts.join("").slice(0, MAX_REFERENCE_LENGTH);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
const SYMBOL_LIMITS = { vs: 10, ss: 10, ks: 4 };
|
|
336
|
+
function assertSymbolLength(symbol, value) {
|
|
337
|
+
const max = SYMBOL_LIMITS[symbol];
|
|
338
|
+
if (value.length > max) {
|
|
339
|
+
throw new Error(
|
|
340
|
+
`buildEndToEndId: ${symbol.toUpperCase()} exceeds SEPA limit (${value.length} > ${max} chars): "${value}"`
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
325
344
|
function buildEndToEndId(payment, options = {}) {
|
|
326
345
|
const { separator = "/" } = options;
|
|
327
346
|
const parts = [];
|
|
328
|
-
if (payment.vs)
|
|
329
|
-
|
|
330
|
-
|
|
347
|
+
if (payment.vs) {
|
|
348
|
+
assertSymbolLength("vs", payment.vs);
|
|
349
|
+
parts.push(`VS${payment.vs}`);
|
|
350
|
+
}
|
|
351
|
+
if (payment.ss) {
|
|
352
|
+
assertSymbolLength("ss", payment.ss);
|
|
353
|
+
parts.push(`SS${payment.ss}`);
|
|
354
|
+
}
|
|
355
|
+
if (payment.ks) {
|
|
356
|
+
assertSymbolLength("ks", payment.ks);
|
|
357
|
+
parts.push(`KS${payment.ks}`);
|
|
358
|
+
}
|
|
331
359
|
if (parts.length === 0) {
|
|
332
360
|
return payment.id.replace(/-/g, "");
|
|
333
361
|
}
|
|
@@ -488,6 +516,10 @@ const mapFinbricksAccountInsert = ({
|
|
|
488
516
|
iban: account.identification.iban
|
|
489
517
|
});
|
|
490
518
|
|
|
519
|
+
const VS_REGEX = /VS[:/\s]*(\d+)/i;
|
|
520
|
+
const SS_REGEX = /SS[:/\s]*(\d+)/i;
|
|
521
|
+
const KS_REGEX = /KS[:/\s]*(\d+)/i;
|
|
522
|
+
const extract = (haystack, regex) => haystack.match(regex)?.[1];
|
|
491
523
|
const mapReferencesToPayment = (reference) => {
|
|
492
524
|
const symbols = {
|
|
493
525
|
vs: void 0,
|
|
@@ -495,19 +527,10 @@ const mapReferencesToPayment = (reference) => {
|
|
|
495
527
|
ks: void 0
|
|
496
528
|
};
|
|
497
529
|
if (!reference) return symbols;
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}
|
|
503
|
-
if (typeof reference === "string") {
|
|
504
|
-
const vsMatch = reference.match(/VS[:\s]*(\d+)/i);
|
|
505
|
-
const ssMatch = reference.match(/SS[:\s]*(\d+)/i);
|
|
506
|
-
const ksMatch = reference.match(/KS[:\s]*(\d+)/i);
|
|
507
|
-
if (vsMatch) symbols.vs = vsMatch[1];
|
|
508
|
-
if (ssMatch) symbols.ss = ssMatch[1];
|
|
509
|
-
if (ksMatch) symbols.ks = ksMatch[1];
|
|
510
|
-
}
|
|
530
|
+
const haystack = Array.isArray(reference) ? reference.join(" ") : reference;
|
|
531
|
+
symbols.vs = extract(haystack, VS_REGEX);
|
|
532
|
+
symbols.ss = extract(haystack, SS_REGEX);
|
|
533
|
+
symbols.ks = extract(haystack, KS_REGEX);
|
|
511
534
|
return symbols;
|
|
512
535
|
};
|
|
513
536
|
|
|
@@ -590,8 +613,23 @@ function detectPaymentType(tx, isIncoming) {
|
|
|
590
613
|
const mapFinbricksTransactionToPayment = (tx, account) => {
|
|
591
614
|
const isIncoming = tx.creditDebitIndicator === "CRDT";
|
|
592
615
|
const related = tx.entryDetails?.transactionDetails?.relatedParties;
|
|
593
|
-
const
|
|
594
|
-
const
|
|
616
|
+
const td = tx.entryDetails?.transactionDetails;
|
|
617
|
+
const referenceSources = [
|
|
618
|
+
td?.remittanceInformation?.structured?.creditorReferenceInformation?.reference,
|
|
619
|
+
td?.references?.endToEndIdentification,
|
|
620
|
+
td?.remittanceInformation?.unstructured,
|
|
621
|
+
td?.additionalRemittanceInformation,
|
|
622
|
+
td?.additionalTransactionInformation
|
|
623
|
+
];
|
|
624
|
+
const symbols = referenceSources.reduce((acc, src) => {
|
|
625
|
+
if (acc.vs && acc.ss && acc.ks) return acc;
|
|
626
|
+
const parsed = mapReferencesToPayment(src);
|
|
627
|
+
return {
|
|
628
|
+
vs: acc.vs ?? parsed.vs,
|
|
629
|
+
ss: acc.ss ?? parsed.ss,
|
|
630
|
+
ks: acc.ks ?? parsed.ks
|
|
631
|
+
};
|
|
632
|
+
}, {});
|
|
595
633
|
const debtorParsed = parseOtherIdentification(
|
|
596
634
|
related?.debtorAccount?.identification?.other?.identification
|
|
597
635
|
);
|
|
@@ -608,11 +646,9 @@ const mapFinbricksTransactionToPayment = (tx, account) => {
|
|
|
608
646
|
currency: tx.amount?.currency || "CZK",
|
|
609
647
|
paymentType: detectPaymentType(tx, isIncoming),
|
|
610
648
|
status: mapFinbricksStatus(tx.status, !!tx.bookingDate?.date),
|
|
611
|
-
message:
|
|
649
|
+
message: td?.remittanceInformation?.unstructured || td?.additionalRemittanceInformation || td?.additionalTransactionInformation || null,
|
|
612
650
|
processedAt: new Date(tx.bookingDate.date),
|
|
613
|
-
...
|
|
614
|
-
tx.entryDetails.transactionDetails?.remittanceInformation?.structured?.creditorReferenceInformation?.reference || (endToEndId && symbolsRegex.test(endToEndId) ? endToEndId : void 0)
|
|
615
|
-
),
|
|
651
|
+
...symbols,
|
|
616
652
|
creditor: {
|
|
617
653
|
holderName: related?.creditorAccount?.name || related?.creditor?.name || "Unknown",
|
|
618
654
|
iban: isIncoming ? account.iban || void 0 : related?.creditorAccount?.identification?.iban || creditorParsed.iban || void 0,
|
|
@@ -935,6 +971,12 @@ class FinbricksConnector extends IBankConnector {
|
|
|
935
971
|
const creditorAgent = creditorIdentification.type === "BBAN" && creditorBic ? {
|
|
936
972
|
financialInstitutionIdentification: { bic: creditorBic }
|
|
937
973
|
} : void 0;
|
|
974
|
+
const reference = buildPaymentReference({
|
|
975
|
+
vs: payment.vs,
|
|
976
|
+
ss: payment.ss,
|
|
977
|
+
ks: payment.ks
|
|
978
|
+
});
|
|
979
|
+
const unstructured = [reference, payment.message?.trim()].filter(Boolean).join(" ").slice(0, 140) || void 0;
|
|
938
980
|
const bankRefId = backendSdk.uuidv4();
|
|
939
981
|
const [response, error] = await backendSdk.useResult(
|
|
940
982
|
this.finbricks.request({
|
|
@@ -964,6 +1006,7 @@ class FinbricksConnector extends IBankConnector {
|
|
|
964
1006
|
...creditorAddress && { postalAddress: creditorAddress }
|
|
965
1007
|
},
|
|
966
1008
|
...creditorAgent && { creditorAgent },
|
|
1009
|
+
...unstructured && { remittanceInformation: { unstructured } },
|
|
967
1010
|
callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`
|
|
968
1011
|
}
|
|
969
1012
|
})
|
|
@@ -1065,6 +1108,8 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1065
1108
|
creditorName: payment.creditor.holderName,
|
|
1066
1109
|
description: payment.message,
|
|
1067
1110
|
variableSymbol: payment.vs ?? (payment.ss ? void 0 : autoVariableSymbol(payment.id)),
|
|
1111
|
+
specificSymbol: payment.ss,
|
|
1112
|
+
constantSymbol: payment.ks,
|
|
1068
1113
|
callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`,
|
|
1069
1114
|
paymentProvider: this.PROVIDER
|
|
1070
1115
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.
|
|
1
|
+
import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.BCqBwSKC.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.
|
|
1
|
+
import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.BCqBwSKC.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
|
|
@@ -320,12 +320,40 @@ function toBatchedPaymentFromPaymentRequest(sp) {
|
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
322
|
|
|
323
|
+
const MAX_REFERENCE_LENGTH = 30;
|
|
324
|
+
function buildPaymentReference(symbols) {
|
|
325
|
+
const parts = [
|
|
326
|
+
symbols.vs && `VS${symbols.vs}`,
|
|
327
|
+
symbols.ss && `SS${symbols.ss}`,
|
|
328
|
+
symbols.ks && `KS${symbols.ks}`
|
|
329
|
+
].filter(Boolean);
|
|
330
|
+
return parts.join("").slice(0, MAX_REFERENCE_LENGTH);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
const SYMBOL_LIMITS = { vs: 10, ss: 10, ks: 4 };
|
|
334
|
+
function assertSymbolLength(symbol, value) {
|
|
335
|
+
const max = SYMBOL_LIMITS[symbol];
|
|
336
|
+
if (value.length > max) {
|
|
337
|
+
throw new Error(
|
|
338
|
+
`buildEndToEndId: ${symbol.toUpperCase()} exceeds SEPA limit (${value.length} > ${max} chars): "${value}"`
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
323
342
|
function buildEndToEndId(payment, options = {}) {
|
|
324
343
|
const { separator = "/" } = options;
|
|
325
344
|
const parts = [];
|
|
326
|
-
if (payment.vs)
|
|
327
|
-
|
|
328
|
-
|
|
345
|
+
if (payment.vs) {
|
|
346
|
+
assertSymbolLength("vs", payment.vs);
|
|
347
|
+
parts.push(`VS${payment.vs}`);
|
|
348
|
+
}
|
|
349
|
+
if (payment.ss) {
|
|
350
|
+
assertSymbolLength("ss", payment.ss);
|
|
351
|
+
parts.push(`SS${payment.ss}`);
|
|
352
|
+
}
|
|
353
|
+
if (payment.ks) {
|
|
354
|
+
assertSymbolLength("ks", payment.ks);
|
|
355
|
+
parts.push(`KS${payment.ks}`);
|
|
356
|
+
}
|
|
329
357
|
if (parts.length === 0) {
|
|
330
358
|
return payment.id.replace(/-/g, "");
|
|
331
359
|
}
|
|
@@ -486,6 +514,10 @@ const mapFinbricksAccountInsert = ({
|
|
|
486
514
|
iban: account.identification.iban
|
|
487
515
|
});
|
|
488
516
|
|
|
517
|
+
const VS_REGEX = /VS[:/\s]*(\d+)/i;
|
|
518
|
+
const SS_REGEX = /SS[:/\s]*(\d+)/i;
|
|
519
|
+
const KS_REGEX = /KS[:/\s]*(\d+)/i;
|
|
520
|
+
const extract = (haystack, regex) => haystack.match(regex)?.[1];
|
|
489
521
|
const mapReferencesToPayment = (reference) => {
|
|
490
522
|
const symbols = {
|
|
491
523
|
vs: void 0,
|
|
@@ -493,19 +525,10 @@ const mapReferencesToPayment = (reference) => {
|
|
|
493
525
|
ks: void 0
|
|
494
526
|
};
|
|
495
527
|
if (!reference) return symbols;
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}
|
|
501
|
-
if (typeof reference === "string") {
|
|
502
|
-
const vsMatch = reference.match(/VS[:\s]*(\d+)/i);
|
|
503
|
-
const ssMatch = reference.match(/SS[:\s]*(\d+)/i);
|
|
504
|
-
const ksMatch = reference.match(/KS[:\s]*(\d+)/i);
|
|
505
|
-
if (vsMatch) symbols.vs = vsMatch[1];
|
|
506
|
-
if (ssMatch) symbols.ss = ssMatch[1];
|
|
507
|
-
if (ksMatch) symbols.ks = ksMatch[1];
|
|
508
|
-
}
|
|
528
|
+
const haystack = Array.isArray(reference) ? reference.join(" ") : reference;
|
|
529
|
+
symbols.vs = extract(haystack, VS_REGEX);
|
|
530
|
+
symbols.ss = extract(haystack, SS_REGEX);
|
|
531
|
+
symbols.ks = extract(haystack, KS_REGEX);
|
|
509
532
|
return symbols;
|
|
510
533
|
};
|
|
511
534
|
|
|
@@ -588,8 +611,23 @@ function detectPaymentType(tx, isIncoming) {
|
|
|
588
611
|
const mapFinbricksTransactionToPayment = (tx, account) => {
|
|
589
612
|
const isIncoming = tx.creditDebitIndicator === "CRDT";
|
|
590
613
|
const related = tx.entryDetails?.transactionDetails?.relatedParties;
|
|
591
|
-
const
|
|
592
|
-
const
|
|
614
|
+
const td = tx.entryDetails?.transactionDetails;
|
|
615
|
+
const referenceSources = [
|
|
616
|
+
td?.remittanceInformation?.structured?.creditorReferenceInformation?.reference,
|
|
617
|
+
td?.references?.endToEndIdentification,
|
|
618
|
+
td?.remittanceInformation?.unstructured,
|
|
619
|
+
td?.additionalRemittanceInformation,
|
|
620
|
+
td?.additionalTransactionInformation
|
|
621
|
+
];
|
|
622
|
+
const symbols = referenceSources.reduce((acc, src) => {
|
|
623
|
+
if (acc.vs && acc.ss && acc.ks) return acc;
|
|
624
|
+
const parsed = mapReferencesToPayment(src);
|
|
625
|
+
return {
|
|
626
|
+
vs: acc.vs ?? parsed.vs,
|
|
627
|
+
ss: acc.ss ?? parsed.ss,
|
|
628
|
+
ks: acc.ks ?? parsed.ks
|
|
629
|
+
};
|
|
630
|
+
}, {});
|
|
593
631
|
const debtorParsed = parseOtherIdentification(
|
|
594
632
|
related?.debtorAccount?.identification?.other?.identification
|
|
595
633
|
);
|
|
@@ -606,11 +644,9 @@ const mapFinbricksTransactionToPayment = (tx, account) => {
|
|
|
606
644
|
currency: tx.amount?.currency || "CZK",
|
|
607
645
|
paymentType: detectPaymentType(tx, isIncoming),
|
|
608
646
|
status: mapFinbricksStatus(tx.status, !!tx.bookingDate?.date),
|
|
609
|
-
message:
|
|
647
|
+
message: td?.remittanceInformation?.unstructured || td?.additionalRemittanceInformation || td?.additionalTransactionInformation || null,
|
|
610
648
|
processedAt: new Date(tx.bookingDate.date),
|
|
611
|
-
...
|
|
612
|
-
tx.entryDetails.transactionDetails?.remittanceInformation?.structured?.creditorReferenceInformation?.reference || (endToEndId && symbolsRegex.test(endToEndId) ? endToEndId : void 0)
|
|
613
|
-
),
|
|
649
|
+
...symbols,
|
|
614
650
|
creditor: {
|
|
615
651
|
holderName: related?.creditorAccount?.name || related?.creditor?.name || "Unknown",
|
|
616
652
|
iban: isIncoming ? account.iban || void 0 : related?.creditorAccount?.identification?.iban || creditorParsed.iban || void 0,
|
|
@@ -933,6 +969,12 @@ class FinbricksConnector extends IBankConnector {
|
|
|
933
969
|
const creditorAgent = creditorIdentification.type === "BBAN" && creditorBic ? {
|
|
934
970
|
financialInstitutionIdentification: { bic: creditorBic }
|
|
935
971
|
} : void 0;
|
|
972
|
+
const reference = buildPaymentReference({
|
|
973
|
+
vs: payment.vs,
|
|
974
|
+
ss: payment.ss,
|
|
975
|
+
ks: payment.ks
|
|
976
|
+
});
|
|
977
|
+
const unstructured = [reference, payment.message?.trim()].filter(Boolean).join(" ").slice(0, 140) || void 0;
|
|
936
978
|
const bankRefId = uuidv4();
|
|
937
979
|
const [response, error] = await useResult(
|
|
938
980
|
this.finbricks.request({
|
|
@@ -962,6 +1004,7 @@ class FinbricksConnector extends IBankConnector {
|
|
|
962
1004
|
...creditorAddress && { postalAddress: creditorAddress }
|
|
963
1005
|
},
|
|
964
1006
|
...creditorAgent && { creditorAgent },
|
|
1007
|
+
...unstructured && { remittanceInformation: { unstructured } },
|
|
965
1008
|
callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`
|
|
966
1009
|
}
|
|
967
1010
|
})
|
|
@@ -1063,6 +1106,8 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1063
1106
|
creditorName: payment.creditor.holderName,
|
|
1064
1107
|
description: payment.message,
|
|
1065
1108
|
variableSymbol: payment.vs ?? (payment.ss ? void 0 : autoVariableSymbol(payment.id)),
|
|
1109
|
+
specificSymbol: payment.ss,
|
|
1110
|
+
constantSymbol: payment.ks,
|
|
1066
1111
|
callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`,
|
|
1067
1112
|
paymentProvider: this.PROVIDER
|
|
1068
1113
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const drizzleOrm = require('drizzle-orm');
|
|
4
|
-
const ott_zod = require('./bank.
|
|
4
|
+
const ott_zod = require('./bank.BSX82jhx.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.
|
|
1
|
+
import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.BCqBwSKC.cjs';
|
|
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 ott_zod = require('./shared/bank.
|
|
3
|
+
const ott_zod = require('./shared/bank.BSX82jhx.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, c 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.
|
|
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, b 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.
|
|
3
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
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.
|
|
1
|
+
import { I as IBankConnector, c 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.BCqBwSKC.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, b 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.BCqBwSKC.cjs';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.mHFTrKBv.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.mHFTrKBv.cjs';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
export { a as BankServiceEnv, B as BankServiceWranglerConfig } from './shared/bank.DyZBd2qL.cjs';
|
|
7
7
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, c 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.
|
|
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, b 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.
|
|
3
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
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.
|
|
1
|
+
import { I as IBankConnector, c 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.BCqBwSKC.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, b 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.BCqBwSKC.mjs';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.BnCJmT6k.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.BnCJmT6k.mjs';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
export { a as BankServiceEnv, B as BankServiceWranglerConfig } from './shared/bank.DyZBd2qL.mjs';
|
|
7
7
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, c 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.
|
|
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, b 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.
|
|
3
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
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.
|
|
1
|
+
import { I as IBankConnector, c 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.BCqBwSKC.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, b 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.BCqBwSKC.js';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.BmX_IG66.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.BmX_IG66.js';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
export { a as BankServiceEnv, B as BankServiceWranglerConfig } from './shared/bank.DyZBd2qL.js';
|
|
7
7
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
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.
|
|
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.CZ8MQDPa.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';
|