@develit-services/bank 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +1 -1
- package/dist/export/worker.d.cts +8 -8
- package/dist/export/worker.d.mts +8 -8
- package/dist/export/worker.d.ts +8 -8
- package/dist/export/worker.mjs +1 -1
- package/dist/export/workflows.cjs +39 -4
- package/dist/export/workflows.mjs +39 -4
- package/dist/shared/{bank.Dk3nEc0x.cjs → bank.C8oW81NT.cjs} +44 -6
- package/dist/shared/{bank.BvQ2SE8p.d.mts → bank.COez_hEH.d.cts} +6 -6
- package/dist/shared/{bank.BvQ2SE8p.d.ts → bank.COez_hEH.d.mts} +6 -6
- package/dist/shared/{bank.BvQ2SE8p.d.cts → bank.COez_hEH.d.ts} +6 -6
- package/dist/shared/{bank.BpTNVqyL.d.mts → bank.Cw3K7nIh.d.cts} +1 -1
- package/dist/shared/{bank.FUi1SRkA.d.ts → bank.VB_ZSWGd.d.ts} +1 -1
- package/dist/shared/{bank.Bo4HtOgs.mjs → bank.aSyaZEZI.mjs} +44 -6
- package/dist/shared/{bank.Bu5RkozT.d.cts → bank.t019WQuV.d.mts} +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 { az as account, aA as accountCredentials, aB as batch, aC as ott, aD as payment, aE as paymentRelations, aF as paymentRequest, aG as paymentRequestRelations } from '../shared/bank.
|
|
1
|
+
export { az as account, aA as accountCredentials, aB as batch, aC as ott, aD as payment, aE as paymentRelations, aF as paymentRequest, aG as paymentRequestRelations } from '../shared/bank.COez_hEH.cjs';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import '@develit-io/backend-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { az as account, aA as accountCredentials, aB as batch, aC as ott, aD as payment, aE as paymentRelations, aF as paymentRequest, aG as paymentRequestRelations } from '../shared/bank.
|
|
1
|
+
export { az as account, aA as accountCredentials, aB as batch, aC as ott, aD as payment, aE as paymentRelations, aF as paymentRequest, aG as paymentRequestRelations } from '../shared/bank.COez_hEH.mjs';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import '@develit-io/backend-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { az as account, aA as accountCredentials, aB as batch, aC as ott, aD as payment, aE as paymentRelations, aF as paymentRequest, aG as paymentRequestRelations } from '../shared/bank.
|
|
1
|
+
export { az as account, aA as accountCredentials, aB as batch, aC as ott, aD as payment, aE as paymentRelations, aF as paymentRequest, aG as paymentRequestRelations } from '../shared/bank.COez_hEH.js';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import '@develit-io/backend-sdk';
|
package/dist/export/worker.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const database_schema = require('../shared/bank.CIWYI18z.cjs');
|
|
|
5
5
|
const drizzleOrm = require('drizzle-orm');
|
|
6
6
|
const cloudflare_workers = require('cloudflare:workers');
|
|
7
7
|
const d1 = require('drizzle-orm/d1');
|
|
8
|
-
const mock_connector = require('../shared/bank.
|
|
8
|
+
const mock_connector = require('../shared/bank.C8oW81NT.cjs');
|
|
9
9
|
require('jose');
|
|
10
10
|
const zod = require('zod');
|
|
11
11
|
const generalCodes = require('@develit-io/general-codes');
|
package/dist/export/worker.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 ConfigEnvironmentBank, t as tables, b as ConnectorKey, I as IBankConnector, c as PaymentType, d as CurrencyCode, H as HandleAuthorizationCallbackInput, e as HandleAuthorizationCallbackOutput } from '../shared/bank.
|
|
2
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.
|
|
1
|
+
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, b as ConnectorKey, I as IBankConnector, c as PaymentType, d as CurrencyCode, H as HandleAuthorizationCallbackInput, e as HandleAuthorizationCallbackOutput } from '../shared/bank.COez_hEH.cjs';
|
|
2
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.Cw3K7nIh.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';
|
|
@@ -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,19 +2948,19 @@ 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
2951
|
BOOKED: "BOOKED";
|
|
2953
2952
|
REJECTED: "REJECTED";
|
|
2954
2953
|
PENDING: "PENDING";
|
|
2954
|
+
PROCESSING: "PROCESSING";
|
|
2955
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
2960
|
BOOKED: "BOOKED";
|
|
2962
2961
|
REJECTED: "REJECTED";
|
|
2963
2962
|
PENDING: "PENDING";
|
|
2963
|
+
PROCESSING: "PROCESSING";
|
|
2964
2964
|
CANCELLED: "CANCELLED";
|
|
2965
2965
|
SCHEDULED: "SCHEDULED";
|
|
2966
2966
|
HOLD: "HOLD";
|
|
@@ -3914,16 +3914,16 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3914
3914
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3915
3915
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3916
3916
|
AUTHORIZED: "AUTHORIZED";
|
|
3917
|
-
COMPLETED: "COMPLETED";
|
|
3918
3917
|
OPENED: "OPENED";
|
|
3918
|
+
COMPLETED: "COMPLETED";
|
|
3919
3919
|
BOOKED: "BOOKED";
|
|
3920
3920
|
SETTLED: "SETTLED";
|
|
3921
3921
|
REJECTED: "REJECTED";
|
|
3922
3922
|
CLOSED: "CLOSED";
|
|
3923
3923
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3924
3924
|
AUTHORIZED: "AUTHORIZED";
|
|
3925
|
-
COMPLETED: "COMPLETED";
|
|
3926
3925
|
OPENED: "OPENED";
|
|
3926
|
+
COMPLETED: "COMPLETED";
|
|
3927
3927
|
BOOKED: "BOOKED";
|
|
3928
3928
|
SETTLED: "SETTLED";
|
|
3929
3929
|
REJECTED: "REJECTED";
|
package/dist/export/worker.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 ConfigEnvironmentBank, t as tables, b as ConnectorKey, I as IBankConnector, c as PaymentType, d as CurrencyCode, H as HandleAuthorizationCallbackInput, e as HandleAuthorizationCallbackOutput } from '../shared/bank.
|
|
2
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.
|
|
1
|
+
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, b as ConnectorKey, I as IBankConnector, c as PaymentType, d as CurrencyCode, H as HandleAuthorizationCallbackInput, e as HandleAuthorizationCallbackOutput } from '../shared/bank.COez_hEH.mjs';
|
|
2
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.t019WQuV.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';
|
|
@@ -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,19 +2948,19 @@ 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
2951
|
BOOKED: "BOOKED";
|
|
2953
2952
|
REJECTED: "REJECTED";
|
|
2954
2953
|
PENDING: "PENDING";
|
|
2954
|
+
PROCESSING: "PROCESSING";
|
|
2955
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
2960
|
BOOKED: "BOOKED";
|
|
2962
2961
|
REJECTED: "REJECTED";
|
|
2963
2962
|
PENDING: "PENDING";
|
|
2963
|
+
PROCESSING: "PROCESSING";
|
|
2964
2964
|
CANCELLED: "CANCELLED";
|
|
2965
2965
|
SCHEDULED: "SCHEDULED";
|
|
2966
2966
|
HOLD: "HOLD";
|
|
@@ -3914,16 +3914,16 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3914
3914
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3915
3915
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3916
3916
|
AUTHORIZED: "AUTHORIZED";
|
|
3917
|
-
COMPLETED: "COMPLETED";
|
|
3918
3917
|
OPENED: "OPENED";
|
|
3918
|
+
COMPLETED: "COMPLETED";
|
|
3919
3919
|
BOOKED: "BOOKED";
|
|
3920
3920
|
SETTLED: "SETTLED";
|
|
3921
3921
|
REJECTED: "REJECTED";
|
|
3922
3922
|
CLOSED: "CLOSED";
|
|
3923
3923
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3924
3924
|
AUTHORIZED: "AUTHORIZED";
|
|
3925
|
-
COMPLETED: "COMPLETED";
|
|
3926
3925
|
OPENED: "OPENED";
|
|
3926
|
+
COMPLETED: "COMPLETED";
|
|
3927
3927
|
BOOKED: "BOOKED";
|
|
3928
3928
|
SETTLED: "SETTLED";
|
|
3929
3929
|
REJECTED: "REJECTED";
|
package/dist/export/worker.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 ConfigEnvironmentBank, t as tables, b as ConnectorKey, I as IBankConnector, c as PaymentType, d as CurrencyCode, H as HandleAuthorizationCallbackInput, e as HandleAuthorizationCallbackOutput } from '../shared/bank.
|
|
2
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.
|
|
1
|
+
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, b as ConnectorKey, I as IBankConnector, c as PaymentType, d as CurrencyCode, H as HandleAuthorizationCallbackInput, e as HandleAuthorizationCallbackOutput } from '../shared/bank.COez_hEH.js';
|
|
2
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.VB_ZSWGd.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';
|
|
@@ -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,19 +2948,19 @@ 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
2951
|
BOOKED: "BOOKED";
|
|
2953
2952
|
REJECTED: "REJECTED";
|
|
2954
2953
|
PENDING: "PENDING";
|
|
2954
|
+
PROCESSING: "PROCESSING";
|
|
2955
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
2960
|
BOOKED: "BOOKED";
|
|
2962
2961
|
REJECTED: "REJECTED";
|
|
2963
2962
|
PENDING: "PENDING";
|
|
2963
|
+
PROCESSING: "PROCESSING";
|
|
2964
2964
|
CANCELLED: "CANCELLED";
|
|
2965
2965
|
SCHEDULED: "SCHEDULED";
|
|
2966
2966
|
HOLD: "HOLD";
|
|
@@ -3914,16 +3914,16 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3914
3914
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3915
3915
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3916
3916
|
AUTHORIZED: "AUTHORIZED";
|
|
3917
|
-
COMPLETED: "COMPLETED";
|
|
3918
3917
|
OPENED: "OPENED";
|
|
3918
|
+
COMPLETED: "COMPLETED";
|
|
3919
3919
|
BOOKED: "BOOKED";
|
|
3920
3920
|
SETTLED: "SETTLED";
|
|
3921
3921
|
REJECTED: "REJECTED";
|
|
3922
3922
|
CLOSED: "CLOSED";
|
|
3923
3923
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3924
3924
|
AUTHORIZED: "AUTHORIZED";
|
|
3925
|
-
COMPLETED: "COMPLETED";
|
|
3926
3925
|
OPENED: "OPENED";
|
|
3926
|
+
COMPLETED: "COMPLETED";
|
|
3927
3927
|
BOOKED: "BOOKED";
|
|
3928
3928
|
SETTLED: "SETTLED";
|
|
3929
3929
|
REJECTED: "REJECTED";
|
package/dist/export/worker.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { v as tables, I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, g as PAY
|
|
|
3
3
|
import { eq, sql, and, like, asc, desc, inArray, gte, lte, isNull, count } from 'drizzle-orm';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { drizzle } from 'drizzle-orm/d1';
|
|
6
|
-
import { j as initiateConnector, g as toIncomingPayment, d as assignAccount, t as toBatchedPayment, h as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from '../shared/bank.
|
|
6
|
+
import { j as initiateConnector, g as toIncomingPayment, d as assignAccount, t as toBatchedPayment, h as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from '../shared/bank.aSyaZEZI.mjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
import { CURRENCY_CODES } from '@develit-io/general-codes';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
4
|
const database_schema = require('../shared/bank.CIWYI18z.cjs');
|
|
5
5
|
const batchLifecycle = require('../shared/bank.NF8bZBy0.cjs');
|
|
6
|
-
const mock_connector = require('../shared/bank.
|
|
6
|
+
const mock_connector = require('../shared/bank.C8oW81NT.cjs');
|
|
7
7
|
const drizzleOrm = require('drizzle-orm');
|
|
8
8
|
const credentialsResolver = require('../shared/bank.B0EWZbAs.cjs');
|
|
9
9
|
const cloudflare_workers = require('cloudflare:workers');
|
|
@@ -283,6 +283,24 @@ class BankProcessBatch extends cloudflare_workers.WorkflowEntrypoint {
|
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
+
function createWorkflowLogger(instanceId) {
|
|
287
|
+
function log(level, event, data) {
|
|
288
|
+
const logData = {
|
|
289
|
+
level,
|
|
290
|
+
event,
|
|
291
|
+
wf_instance: instanceId,
|
|
292
|
+
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
293
|
+
...data
|
|
294
|
+
};
|
|
295
|
+
console[level](JSON.stringify(logData));
|
|
296
|
+
}
|
|
297
|
+
return {
|
|
298
|
+
info: (event, data) => log("info", event, data),
|
|
299
|
+
warn: (event, data) => log("warn", event, data),
|
|
300
|
+
error: (event, data) => log("error", event, data)
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
|
|
286
304
|
function pushToQueue(queue, message) {
|
|
287
305
|
if (!Array.isArray(message)) return queue.send(message, { contentType: "v8" });
|
|
288
306
|
return queue.sendBatch(
|
|
@@ -296,6 +314,7 @@ class BankSyncAccountPayments extends cloudflare_workers.WorkflowEntrypoint {
|
|
|
296
314
|
async run(event, step) {
|
|
297
315
|
const { accountId } = event.payload;
|
|
298
316
|
const db = d1.drizzle(this.env.BANK_D1, { schema: database_schema.tables });
|
|
317
|
+
const logger = createWorkflowLogger(event.instanceId);
|
|
299
318
|
if (!accountId) {
|
|
300
319
|
throw new cloudflare_workflows.NonRetryableError(`Haven't obtained accountId to load.`);
|
|
301
320
|
}
|
|
@@ -314,11 +333,16 @@ class BankSyncAccountPayments extends cloudflare_workers.WorkflowEntrypoint {
|
|
|
314
333
|
const payments = await step.do(
|
|
315
334
|
"fetch bank payments",
|
|
316
335
|
{
|
|
317
|
-
retries: { limit: 5, delay:
|
|
318
|
-
timeout: "
|
|
336
|
+
retries: { limit: 5, delay: "2 minutes", backoff: "exponential" },
|
|
337
|
+
timeout: "2 minutes"
|
|
319
338
|
},
|
|
320
339
|
async () => {
|
|
321
340
|
try {
|
|
341
|
+
logger.info("payments.fetch.started", {
|
|
342
|
+
accountId,
|
|
343
|
+
connectorKey: account.connectorKey,
|
|
344
|
+
lastSyncAt: account.lastSyncAt?.toISOString()
|
|
345
|
+
});
|
|
322
346
|
const resolveCredentials = await credentialsResolver.createCredentialsResolver(
|
|
323
347
|
db,
|
|
324
348
|
this.env
|
|
@@ -334,12 +358,23 @@ class BankSyncAccountPayments extends cloudflare_workers.WorkflowEntrypoint {
|
|
|
334
358
|
}
|
|
335
359
|
]
|
|
336
360
|
});
|
|
337
|
-
|
|
361
|
+
const result = await connector.getAllAccountPayments({
|
|
338
362
|
account,
|
|
339
363
|
filter: { dateFrom: account.lastSyncAt }
|
|
340
364
|
});
|
|
365
|
+
logger.info("payments.fetch.completed", {
|
|
366
|
+
accountId,
|
|
367
|
+
connectorKey: account.connectorKey,
|
|
368
|
+
paymentsCount: result.length
|
|
369
|
+
});
|
|
370
|
+
return result;
|
|
341
371
|
} catch (err) {
|
|
342
372
|
const message = err instanceof Error ? err.message : typeof err === "object" && err !== null && "message" in err ? String(err.message) : JSON.stringify(err);
|
|
373
|
+
logger.error("payments.fetch.failed", {
|
|
374
|
+
accountId,
|
|
375
|
+
connectorKey: account.connectorKey,
|
|
376
|
+
error: message
|
|
377
|
+
});
|
|
343
378
|
throw new Error(message);
|
|
344
379
|
}
|
|
345
380
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { first, uuidv4, asNonEmpty } from '@develit-io/backend-sdk';
|
|
2
2
|
import { v as tables, o as isPaymentCompleted } from '../shared/bank.C7MA33AX.mjs';
|
|
3
3
|
import { i as isBatchAuthorized, b as isBatchFailed, d as isBatchProcessing } from '../shared/bank.XqSw509X.mjs';
|
|
4
|
-
import { e as toBatchedPaymentFromPaymentRequest, i as toPreparedPayment, j as initiateConnector } from '../shared/bank.
|
|
4
|
+
import { e as toBatchedPaymentFromPaymentRequest, i as toPreparedPayment, j as initiateConnector } from '../shared/bank.aSyaZEZI.mjs';
|
|
5
5
|
import { eq, and, inArray } from 'drizzle-orm';
|
|
6
6
|
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.UBWdag5k.mjs';
|
|
7
7
|
import { WorkflowEntrypoint } from 'cloudflare:workers';
|
|
@@ -281,6 +281,24 @@ class BankProcessBatch extends WorkflowEntrypoint {
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
+
function createWorkflowLogger(instanceId) {
|
|
285
|
+
function log(level, event, data) {
|
|
286
|
+
const logData = {
|
|
287
|
+
level,
|
|
288
|
+
event,
|
|
289
|
+
wf_instance: instanceId,
|
|
290
|
+
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
291
|
+
...data
|
|
292
|
+
};
|
|
293
|
+
console[level](JSON.stringify(logData));
|
|
294
|
+
}
|
|
295
|
+
return {
|
|
296
|
+
info: (event, data) => log("info", event, data),
|
|
297
|
+
warn: (event, data) => log("warn", event, data),
|
|
298
|
+
error: (event, data) => log("error", event, data)
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
|
|
284
302
|
function pushToQueue(queue, message) {
|
|
285
303
|
if (!Array.isArray(message)) return queue.send(message, { contentType: "v8" });
|
|
286
304
|
return queue.sendBatch(
|
|
@@ -294,6 +312,7 @@ class BankSyncAccountPayments extends WorkflowEntrypoint {
|
|
|
294
312
|
async run(event, step) {
|
|
295
313
|
const { accountId } = event.payload;
|
|
296
314
|
const db = drizzle(this.env.BANK_D1, { schema: tables });
|
|
315
|
+
const logger = createWorkflowLogger(event.instanceId);
|
|
297
316
|
if (!accountId) {
|
|
298
317
|
throw new NonRetryableError(`Haven't obtained accountId to load.`);
|
|
299
318
|
}
|
|
@@ -312,11 +331,16 @@ class BankSyncAccountPayments extends WorkflowEntrypoint {
|
|
|
312
331
|
const payments = await step.do(
|
|
313
332
|
"fetch bank payments",
|
|
314
333
|
{
|
|
315
|
-
retries: { limit: 5, delay:
|
|
316
|
-
timeout: "
|
|
334
|
+
retries: { limit: 5, delay: "2 minutes", backoff: "exponential" },
|
|
335
|
+
timeout: "2 minutes"
|
|
317
336
|
},
|
|
318
337
|
async () => {
|
|
319
338
|
try {
|
|
339
|
+
logger.info("payments.fetch.started", {
|
|
340
|
+
accountId,
|
|
341
|
+
connectorKey: account.connectorKey,
|
|
342
|
+
lastSyncAt: account.lastSyncAt?.toISOString()
|
|
343
|
+
});
|
|
320
344
|
const resolveCredentials = await createCredentialsResolver(
|
|
321
345
|
db,
|
|
322
346
|
this.env
|
|
@@ -332,12 +356,23 @@ class BankSyncAccountPayments extends WorkflowEntrypoint {
|
|
|
332
356
|
}
|
|
333
357
|
]
|
|
334
358
|
});
|
|
335
|
-
|
|
359
|
+
const result = await connector.getAllAccountPayments({
|
|
336
360
|
account,
|
|
337
361
|
filter: { dateFrom: account.lastSyncAt }
|
|
338
362
|
});
|
|
363
|
+
logger.info("payments.fetch.completed", {
|
|
364
|
+
accountId,
|
|
365
|
+
connectorKey: account.connectorKey,
|
|
366
|
+
paymentsCount: result.length
|
|
367
|
+
});
|
|
368
|
+
return result;
|
|
339
369
|
} catch (err) {
|
|
340
370
|
const message = err instanceof Error ? err.message : typeof err === "object" && err !== null && "message" in err ? String(err.message) : JSON.stringify(err);
|
|
371
|
+
logger.error("payments.fetch.failed", {
|
|
372
|
+
accountId,
|
|
373
|
+
connectorKey: account.connectorKey,
|
|
374
|
+
error: message
|
|
375
|
+
});
|
|
341
376
|
throw new Error(message);
|
|
342
377
|
}
|
|
343
378
|
}
|
|
@@ -1388,9 +1388,30 @@ class DbuConnector extends IBankConnector {
|
|
|
1388
1388
|
if (body && method !== "GET") {
|
|
1389
1389
|
fetchOptions.body = JSON.stringify(body);
|
|
1390
1390
|
}
|
|
1391
|
+
console.log(
|
|
1392
|
+
"[DBU] request",
|
|
1393
|
+
JSON.stringify(
|
|
1394
|
+
{
|
|
1395
|
+
method,
|
|
1396
|
+
url: url.toString(),
|
|
1397
|
+
requestId,
|
|
1398
|
+
headers: defaultHeaders,
|
|
1399
|
+
body: body ?? null
|
|
1400
|
+
},
|
|
1401
|
+
null,
|
|
1402
|
+
2
|
|
1403
|
+
)
|
|
1404
|
+
);
|
|
1391
1405
|
const response = await this.api.fetch(url.toString(), fetchOptions);
|
|
1392
1406
|
if (!response.ok) {
|
|
1393
1407
|
const errorBody = await response.text().catch(() => "unable to read body");
|
|
1408
|
+
console.error("[DBU] error response", {
|
|
1409
|
+
status: response.status,
|
|
1410
|
+
statusText: response.statusText,
|
|
1411
|
+
url: url.toString(),
|
|
1412
|
+
requestId,
|
|
1413
|
+
body: errorBody
|
|
1414
|
+
});
|
|
1394
1415
|
throw backendSdk.createInternalError(
|
|
1395
1416
|
new Error(`DBU API error: ${response.status}`),
|
|
1396
1417
|
{
|
|
@@ -1398,7 +1419,21 @@ class DbuConnector extends IBankConnector {
|
|
|
1398
1419
|
}
|
|
1399
1420
|
);
|
|
1400
1421
|
}
|
|
1401
|
-
|
|
1422
|
+
const data = await response.json();
|
|
1423
|
+
console.log(
|
|
1424
|
+
"[DBU] response",
|
|
1425
|
+
JSON.stringify(
|
|
1426
|
+
{
|
|
1427
|
+
status: response.status,
|
|
1428
|
+
url: url.toString(),
|
|
1429
|
+
requestId,
|
|
1430
|
+
body: data
|
|
1431
|
+
},
|
|
1432
|
+
null,
|
|
1433
|
+
2
|
|
1434
|
+
)
|
|
1435
|
+
);
|
|
1436
|
+
return data;
|
|
1402
1437
|
}
|
|
1403
1438
|
mapDbuCurrencyCode(dbuCurrency) {
|
|
1404
1439
|
const currency = dbuCurrency.toUpperCase();
|
|
@@ -1441,14 +1476,14 @@ class DbuConnector extends IBankConnector {
|
|
|
1441
1476
|
creditor: {
|
|
1442
1477
|
number: transaction.accountNumberCredit,
|
|
1443
1478
|
bankCode: transaction.bankCodeCredit,
|
|
1444
|
-
iban: creditorIban
|
|
1445
|
-
|
|
1479
|
+
iban: creditorIban,
|
|
1480
|
+
holderName: transaction.accountCredit?.record?.accountFullName || transaction.accountCredit?.record?.accountName || void 0
|
|
1446
1481
|
},
|
|
1447
1482
|
debtor: {
|
|
1448
1483
|
number: transaction.accountNumberDebit,
|
|
1449
1484
|
bankCode: transaction.bankCodeDebit,
|
|
1450
|
-
iban: debtorIban
|
|
1451
|
-
|
|
1485
|
+
iban: debtorIban,
|
|
1486
|
+
holderName: transaction.accountDebit?.record?.accountFullName || transaction.accountDebit?.record?.accountName || void 0
|
|
1452
1487
|
},
|
|
1453
1488
|
debtorIban
|
|
1454
1489
|
};
|
|
@@ -1744,7 +1779,10 @@ class DbuConnector extends IBankConnector {
|
|
|
1744
1779
|
);
|
|
1745
1780
|
allPayments.push(payment);
|
|
1746
1781
|
} catch (error) {
|
|
1747
|
-
console.error(
|
|
1782
|
+
console.error(
|
|
1783
|
+
`[DBU] Failed to map transaction ${transaction.idRequiredTransaction}:`,
|
|
1784
|
+
error instanceof Error ? error.message : String(error)
|
|
1785
|
+
);
|
|
1748
1786
|
}
|
|
1749
1787
|
}
|
|
1750
1788
|
if (response.transactions.transaction.length < limit) {
|
|
@@ -3348,7 +3348,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3348
3348
|
tableName: "batch";
|
|
3349
3349
|
dataType: "string";
|
|
3350
3350
|
columnType: "SQLiteText";
|
|
3351
|
-
data: "AUTHORIZED" | "
|
|
3351
|
+
data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
|
|
3352
3352
|
driverParam: string;
|
|
3353
3353
|
notNull: false;
|
|
3354
3354
|
hasDefault: false;
|
|
@@ -3361,7 +3361,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3361
3361
|
generated: undefined;
|
|
3362
3362
|
}, {}, {
|
|
3363
3363
|
length: number | undefined;
|
|
3364
|
-
$type: "AUTHORIZED" | "
|
|
3364
|
+
$type: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
|
|
3365
3365
|
}>;
|
|
3366
3366
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3367
3367
|
name: "status_reason";
|
|
@@ -3792,7 +3792,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3792
3792
|
tableName: "payment";
|
|
3793
3793
|
dataType: "string";
|
|
3794
3794
|
columnType: "SQLiteText";
|
|
3795
|
-
data: "
|
|
3795
|
+
data: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3796
3796
|
driverParam: string;
|
|
3797
3797
|
notNull: true;
|
|
3798
3798
|
hasDefault: false;
|
|
@@ -3805,7 +3805,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3805
3805
|
generated: undefined;
|
|
3806
3806
|
}, {}, {
|
|
3807
3807
|
length: number | undefined;
|
|
3808
|
-
$type: "
|
|
3808
|
+
$type: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3809
3809
|
}>;
|
|
3810
3810
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3811
3811
|
name: "status_reason";
|
|
@@ -4386,7 +4386,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4386
4386
|
tableName: "payment_request";
|
|
4387
4387
|
dataType: "string";
|
|
4388
4388
|
columnType: "SQLiteText";
|
|
4389
|
-
data: "AUTHORIZED" | "
|
|
4389
|
+
data: "AUTHORIZED" | "OPENED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
4390
4390
|
driverParam: string;
|
|
4391
4391
|
notNull: true;
|
|
4392
4392
|
hasDefault: false;
|
|
@@ -4399,7 +4399,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4399
4399
|
generated: undefined;
|
|
4400
4400
|
}, {}, {
|
|
4401
4401
|
length: number | undefined;
|
|
4402
|
-
$type: "AUTHORIZED" | "
|
|
4402
|
+
$type: "AUTHORIZED" | "OPENED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
4403
4403
|
}>;
|
|
4404
4404
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
4405
4405
|
name: "status_reason";
|
|
@@ -3348,7 +3348,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3348
3348
|
tableName: "batch";
|
|
3349
3349
|
dataType: "string";
|
|
3350
3350
|
columnType: "SQLiteText";
|
|
3351
|
-
data: "AUTHORIZED" | "
|
|
3351
|
+
data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
|
|
3352
3352
|
driverParam: string;
|
|
3353
3353
|
notNull: false;
|
|
3354
3354
|
hasDefault: false;
|
|
@@ -3361,7 +3361,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3361
3361
|
generated: undefined;
|
|
3362
3362
|
}, {}, {
|
|
3363
3363
|
length: number | undefined;
|
|
3364
|
-
$type: "AUTHORIZED" | "
|
|
3364
|
+
$type: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
|
|
3365
3365
|
}>;
|
|
3366
3366
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3367
3367
|
name: "status_reason";
|
|
@@ -3792,7 +3792,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3792
3792
|
tableName: "payment";
|
|
3793
3793
|
dataType: "string";
|
|
3794
3794
|
columnType: "SQLiteText";
|
|
3795
|
-
data: "
|
|
3795
|
+
data: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3796
3796
|
driverParam: string;
|
|
3797
3797
|
notNull: true;
|
|
3798
3798
|
hasDefault: false;
|
|
@@ -3805,7 +3805,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3805
3805
|
generated: undefined;
|
|
3806
3806
|
}, {}, {
|
|
3807
3807
|
length: number | undefined;
|
|
3808
|
-
$type: "
|
|
3808
|
+
$type: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3809
3809
|
}>;
|
|
3810
3810
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3811
3811
|
name: "status_reason";
|
|
@@ -4386,7 +4386,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4386
4386
|
tableName: "payment_request";
|
|
4387
4387
|
dataType: "string";
|
|
4388
4388
|
columnType: "SQLiteText";
|
|
4389
|
-
data: "AUTHORIZED" | "
|
|
4389
|
+
data: "AUTHORIZED" | "OPENED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
4390
4390
|
driverParam: string;
|
|
4391
4391
|
notNull: true;
|
|
4392
4392
|
hasDefault: false;
|
|
@@ -4399,7 +4399,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4399
4399
|
generated: undefined;
|
|
4400
4400
|
}, {}, {
|
|
4401
4401
|
length: number | undefined;
|
|
4402
|
-
$type: "AUTHORIZED" | "
|
|
4402
|
+
$type: "AUTHORIZED" | "OPENED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
4403
4403
|
}>;
|
|
4404
4404
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
4405
4405
|
name: "status_reason";
|
|
@@ -3348,7 +3348,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3348
3348
|
tableName: "batch";
|
|
3349
3349
|
dataType: "string";
|
|
3350
3350
|
columnType: "SQLiteText";
|
|
3351
|
-
data: "AUTHORIZED" | "
|
|
3351
|
+
data: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
|
|
3352
3352
|
driverParam: string;
|
|
3353
3353
|
notNull: false;
|
|
3354
3354
|
hasDefault: false;
|
|
@@ -3361,7 +3361,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3361
3361
|
generated: undefined;
|
|
3362
3362
|
}, {}, {
|
|
3363
3363
|
length: number | undefined;
|
|
3364
|
-
$type: "AUTHORIZED" | "
|
|
3364
|
+
$type: "AUTHORIZED" | "COMPLETED" | "PROCESSING" | "READY_TO_SIGN" | "FAILED";
|
|
3365
3365
|
}>;
|
|
3366
3366
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3367
3367
|
name: "status_reason";
|
|
@@ -3792,7 +3792,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3792
3792
|
tableName: "payment";
|
|
3793
3793
|
dataType: "string";
|
|
3794
3794
|
columnType: "SQLiteText";
|
|
3795
|
-
data: "
|
|
3795
|
+
data: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3796
3796
|
driverParam: string;
|
|
3797
3797
|
notNull: true;
|
|
3798
3798
|
hasDefault: false;
|
|
@@ -3805,7 +3805,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3805
3805
|
generated: undefined;
|
|
3806
3806
|
}, {}, {
|
|
3807
3807
|
length: number | undefined;
|
|
3808
|
-
$type: "
|
|
3808
|
+
$type: "BOOKED" | "REJECTED" | "PENDING" | "PROCESSING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3809
3809
|
}>;
|
|
3810
3810
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3811
3811
|
name: "status_reason";
|
|
@@ -4386,7 +4386,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4386
4386
|
tableName: "payment_request";
|
|
4387
4387
|
dataType: "string";
|
|
4388
4388
|
columnType: "SQLiteText";
|
|
4389
|
-
data: "AUTHORIZED" | "
|
|
4389
|
+
data: "AUTHORIZED" | "OPENED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
4390
4390
|
driverParam: string;
|
|
4391
4391
|
notNull: true;
|
|
4392
4392
|
hasDefault: false;
|
|
@@ -4399,7 +4399,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4399
4399
|
generated: undefined;
|
|
4400
4400
|
}, {}, {
|
|
4401
4401
|
length: number | undefined;
|
|
4402
|
-
$type: "AUTHORIZED" | "
|
|
4402
|
+
$type: "AUTHORIZED" | "OPENED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
4403
4403
|
}>;
|
|
4404
4404
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
4405
4405
|
name: "status_reason";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as CurrencyCode, O as BankCode, $ as CountryCode, P as PaymentRequestSelectType } from './bank.
|
|
1
|
+
import { d as CurrencyCode, O as BankCode, $ as CountryCode, P as PaymentRequestSelectType } from './bank.COez_hEH.cjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as CurrencyCode, O as BankCode, $ as CountryCode, P as PaymentRequestSelectType } from './bank.
|
|
1
|
+
import { d as CurrencyCode, O as BankCode, $ as CountryCode, P as PaymentRequestSelectType } from './bank.COez_hEH.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
|
|
@@ -1386,9 +1386,30 @@ class DbuConnector extends IBankConnector {
|
|
|
1386
1386
|
if (body && method !== "GET") {
|
|
1387
1387
|
fetchOptions.body = JSON.stringify(body);
|
|
1388
1388
|
}
|
|
1389
|
+
console.log(
|
|
1390
|
+
"[DBU] request",
|
|
1391
|
+
JSON.stringify(
|
|
1392
|
+
{
|
|
1393
|
+
method,
|
|
1394
|
+
url: url.toString(),
|
|
1395
|
+
requestId,
|
|
1396
|
+
headers: defaultHeaders,
|
|
1397
|
+
body: body ?? null
|
|
1398
|
+
},
|
|
1399
|
+
null,
|
|
1400
|
+
2
|
|
1401
|
+
)
|
|
1402
|
+
);
|
|
1389
1403
|
const response = await this.api.fetch(url.toString(), fetchOptions);
|
|
1390
1404
|
if (!response.ok) {
|
|
1391
1405
|
const errorBody = await response.text().catch(() => "unable to read body");
|
|
1406
|
+
console.error("[DBU] error response", {
|
|
1407
|
+
status: response.status,
|
|
1408
|
+
statusText: response.statusText,
|
|
1409
|
+
url: url.toString(),
|
|
1410
|
+
requestId,
|
|
1411
|
+
body: errorBody
|
|
1412
|
+
});
|
|
1392
1413
|
throw createInternalError(
|
|
1393
1414
|
new Error(`DBU API error: ${response.status}`),
|
|
1394
1415
|
{
|
|
@@ -1396,7 +1417,21 @@ class DbuConnector extends IBankConnector {
|
|
|
1396
1417
|
}
|
|
1397
1418
|
);
|
|
1398
1419
|
}
|
|
1399
|
-
|
|
1420
|
+
const data = await response.json();
|
|
1421
|
+
console.log(
|
|
1422
|
+
"[DBU] response",
|
|
1423
|
+
JSON.stringify(
|
|
1424
|
+
{
|
|
1425
|
+
status: response.status,
|
|
1426
|
+
url: url.toString(),
|
|
1427
|
+
requestId,
|
|
1428
|
+
body: data
|
|
1429
|
+
},
|
|
1430
|
+
null,
|
|
1431
|
+
2
|
|
1432
|
+
)
|
|
1433
|
+
);
|
|
1434
|
+
return data;
|
|
1400
1435
|
}
|
|
1401
1436
|
mapDbuCurrencyCode(dbuCurrency) {
|
|
1402
1437
|
const currency = dbuCurrency.toUpperCase();
|
|
@@ -1439,14 +1474,14 @@ class DbuConnector extends IBankConnector {
|
|
|
1439
1474
|
creditor: {
|
|
1440
1475
|
number: transaction.accountNumberCredit,
|
|
1441
1476
|
bankCode: transaction.bankCodeCredit,
|
|
1442
|
-
iban: creditorIban
|
|
1443
|
-
|
|
1477
|
+
iban: creditorIban,
|
|
1478
|
+
holderName: transaction.accountCredit?.record?.accountFullName || transaction.accountCredit?.record?.accountName || void 0
|
|
1444
1479
|
},
|
|
1445
1480
|
debtor: {
|
|
1446
1481
|
number: transaction.accountNumberDebit,
|
|
1447
1482
|
bankCode: transaction.bankCodeDebit,
|
|
1448
|
-
iban: debtorIban
|
|
1449
|
-
|
|
1483
|
+
iban: debtorIban,
|
|
1484
|
+
holderName: transaction.accountDebit?.record?.accountFullName || transaction.accountDebit?.record?.accountName || void 0
|
|
1450
1485
|
},
|
|
1451
1486
|
debtorIban
|
|
1452
1487
|
};
|
|
@@ -1742,7 +1777,10 @@ class DbuConnector extends IBankConnector {
|
|
|
1742
1777
|
);
|
|
1743
1778
|
allPayments.push(payment);
|
|
1744
1779
|
} catch (error) {
|
|
1745
|
-
console.error(
|
|
1780
|
+
console.error(
|
|
1781
|
+
`[DBU] Failed to map transaction ${transaction.idRequiredTransaction}:`,
|
|
1782
|
+
error instanceof Error ? error.message : String(error)
|
|
1783
|
+
);
|
|
1746
1784
|
}
|
|
1747
1785
|
}
|
|
1748
1786
|
if (response.transactions.transaction.length < limit) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as CurrencyCode, O as BankCode, $ as CountryCode, P as PaymentRequestSelectType } from './bank.
|
|
1
|
+
import { d as CurrencyCode, O as BankCode, $ as CountryCode, P as PaymentRequestSelectType } from './bank.COez_hEH.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 mock_connector = require('./shared/bank.
|
|
3
|
+
const mock_connector = require('./shared/bank.C8oW81NT.cjs');
|
|
4
4
|
const database_schema = require('./shared/bank.CIWYI18z.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, f as ConnectedAccount, c as PaymentType, g as CredentialsResolver, h as AccountCredentialsInsertType, i as AccountInsertType, j as BatchedPayment, k as InitiatedBatch, l as IncomingPayment, m as InitiatedPayment, A as AccountSelectType, n as ParsedBankPayment, o as PaymentRequestStatus, p as AuthorizationCallbackResult, q as BatchMetadata, r as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, s as AccountAssignedPayment, u as PreparedPayment, v as CompletedPayment, w as PaymentRequestInsertType } from './shared/bank.
|
|
2
|
-
export { x as ACCOUNT_STATUSES, y as AccountCredentialsPatchType, z as AccountCredentialsSelectType, D as AccountCredentialsUpdateType, E as AccountPatchType, F as AccountStatus, G as AccountUpdateType, J as AuthorizedBatch, K as BATCH_MODES, M as BATCH_STATUES, M as BATCH_STATUSES, N as BankAccountWithLastSync, O as BankCode, Q as BatchInsertType, R as BatchLifecycle, S as BatchMode, T as BatchPayment, B as BatchSelectType, U as BatchStatus, V as CHARGE_BEARERS, W as CONNECTOR_KEYS, X as COUNTRY_CODES, Y as CREDENTIALS_TYPES, Z as ChargeBearer, _ as CompletedBatch, C as ConfigEnvironmentBank, $ as CountryCode, a0 as CredentialsType, d as CurrencyCode, a1 as INSTRUCTION_PRIORITIES, a2 as InstructionPriority, L as LastSyncMetadata, a3 as PAYMENT_DIRECTIONS, a4 as PAYMENT_REQUEST_STATUSES, a5 as PAYMENT_STATUSES, a6 as PAYMENT_TYPES, a7 as PaymentDirection, a8 as PaymentFailedInsertType, a9 as PaymentInsertType, aa as PaymentLifecycle, ab as PaymentPreparedInsertType, ac as PaymentStatus, ad as ProcessingBatch, ae as ReadyToSignBatch, af as ResolvedCredentials, ag as TOKEN_TYPES, ah as TokenType, ai as accountCredentialsInsertSchema, aj as accountCredentialsSelectSchema, ak as accountCredentialsUpdateSchema, al as accountInsertSchema, am as accountSelectSchema, an as accountUpdateSchema, ao as hasPaymentAccountAssigned, ap as isBatchAuthorized, aq as isBatchCompleted, ar as isBatchFailed, as as isBatchInitiated, at as isBatchProcessing, au as isBatchReadyToSign, av as isPaymentCompleted, aw as isPendingStatus, ax as isProcessedStatus, ay 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, b as ConnectorKey, f as ConnectedAccount, c as PaymentType, g as CredentialsResolver, h as AccountCredentialsInsertType, i as AccountInsertType, j as BatchedPayment, k as InitiatedBatch, l as IncomingPayment, m as InitiatedPayment, A as AccountSelectType, n as ParsedBankPayment, o as PaymentRequestStatus, p as AuthorizationCallbackResult, q as BatchMetadata, r as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, s as AccountAssignedPayment, u as PreparedPayment, v as CompletedPayment, w as PaymentRequestInsertType } from './shared/bank.COez_hEH.cjs';
|
|
2
|
+
export { x as ACCOUNT_STATUSES, y as AccountCredentialsPatchType, z as AccountCredentialsSelectType, D as AccountCredentialsUpdateType, E as AccountPatchType, F as AccountStatus, G as AccountUpdateType, J as AuthorizedBatch, K as BATCH_MODES, M as BATCH_STATUES, M as BATCH_STATUSES, N as BankAccountWithLastSync, O as BankCode, Q as BatchInsertType, R as BatchLifecycle, S as BatchMode, T as BatchPayment, B as BatchSelectType, U as BatchStatus, V as CHARGE_BEARERS, W as CONNECTOR_KEYS, X as COUNTRY_CODES, Y as CREDENTIALS_TYPES, Z as ChargeBearer, _ as CompletedBatch, C as ConfigEnvironmentBank, $ as CountryCode, a0 as CredentialsType, d as CurrencyCode, a1 as INSTRUCTION_PRIORITIES, a2 as InstructionPriority, L as LastSyncMetadata, a3 as PAYMENT_DIRECTIONS, a4 as PAYMENT_REQUEST_STATUSES, a5 as PAYMENT_STATUSES, a6 as PAYMENT_TYPES, a7 as PaymentDirection, a8 as PaymentFailedInsertType, a9 as PaymentInsertType, aa as PaymentLifecycle, ab as PaymentPreparedInsertType, ac as PaymentStatus, ad as ProcessingBatch, ae as ReadyToSignBatch, af as ResolvedCredentials, ag as TOKEN_TYPES, ah as TokenType, ai as accountCredentialsInsertSchema, aj as accountCredentialsSelectSchema, ak as accountCredentialsUpdateSchema, al as accountInsertSchema, am as accountSelectSchema, an as accountUpdateSchema, ao as hasPaymentAccountAssigned, ap as isBatchAuthorized, aq as isBatchCompleted, ar as isBatchFailed, as as isBatchInitiated, at as isBatchProcessing, au as isBatchReadyToSign, av as isPaymentCompleted, aw as isPendingStatus, ax as isProcessedStatus, ay as isTerminalStatus } from './shared/bank.COez_hEH.cjs';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.Cw3K7nIh.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.Cw3K7nIh.cjs';
|
|
5
5
|
export { a as BankServiceEnv, b as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.Bz4DIxJL.cjs';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_zod from 'drizzle-zod';
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, b as ConnectorKey, f as ConnectedAccount, c as PaymentType, g as CredentialsResolver, h as AccountCredentialsInsertType, i as AccountInsertType, j as BatchedPayment, k as InitiatedBatch, l as IncomingPayment, m as InitiatedPayment, A as AccountSelectType, n as ParsedBankPayment, o as PaymentRequestStatus, p as AuthorizationCallbackResult, q as BatchMetadata, r as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, s as AccountAssignedPayment, u as PreparedPayment, v as CompletedPayment, w as PaymentRequestInsertType } from './shared/bank.
|
|
2
|
-
export { x as ACCOUNT_STATUSES, y as AccountCredentialsPatchType, z as AccountCredentialsSelectType, D as AccountCredentialsUpdateType, E as AccountPatchType, F as AccountStatus, G as AccountUpdateType, J as AuthorizedBatch, K as BATCH_MODES, M as BATCH_STATUES, M as BATCH_STATUSES, N as BankAccountWithLastSync, O as BankCode, Q as BatchInsertType, R as BatchLifecycle, S as BatchMode, T as BatchPayment, B as BatchSelectType, U as BatchStatus, V as CHARGE_BEARERS, W as CONNECTOR_KEYS, X as COUNTRY_CODES, Y as CREDENTIALS_TYPES, Z as ChargeBearer, _ as CompletedBatch, C as ConfigEnvironmentBank, $ as CountryCode, a0 as CredentialsType, d as CurrencyCode, a1 as INSTRUCTION_PRIORITIES, a2 as InstructionPriority, L as LastSyncMetadata, a3 as PAYMENT_DIRECTIONS, a4 as PAYMENT_REQUEST_STATUSES, a5 as PAYMENT_STATUSES, a6 as PAYMENT_TYPES, a7 as PaymentDirection, a8 as PaymentFailedInsertType, a9 as PaymentInsertType, aa as PaymentLifecycle, ab as PaymentPreparedInsertType, ac as PaymentStatus, ad as ProcessingBatch, ae as ReadyToSignBatch, af as ResolvedCredentials, ag as TOKEN_TYPES, ah as TokenType, ai as accountCredentialsInsertSchema, aj as accountCredentialsSelectSchema, ak as accountCredentialsUpdateSchema, al as accountInsertSchema, am as accountSelectSchema, an as accountUpdateSchema, ao as hasPaymentAccountAssigned, ap as isBatchAuthorized, aq as isBatchCompleted, ar as isBatchFailed, as as isBatchInitiated, at as isBatchProcessing, au as isBatchReadyToSign, av as isPaymentCompleted, aw as isPendingStatus, ax as isProcessedStatus, ay 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, b as ConnectorKey, f as ConnectedAccount, c as PaymentType, g as CredentialsResolver, h as AccountCredentialsInsertType, i as AccountInsertType, j as BatchedPayment, k as InitiatedBatch, l as IncomingPayment, m as InitiatedPayment, A as AccountSelectType, n as ParsedBankPayment, o as PaymentRequestStatus, p as AuthorizationCallbackResult, q as BatchMetadata, r as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, s as AccountAssignedPayment, u as PreparedPayment, v as CompletedPayment, w as PaymentRequestInsertType } from './shared/bank.COez_hEH.mjs';
|
|
2
|
+
export { x as ACCOUNT_STATUSES, y as AccountCredentialsPatchType, z as AccountCredentialsSelectType, D as AccountCredentialsUpdateType, E as AccountPatchType, F as AccountStatus, G as AccountUpdateType, J as AuthorizedBatch, K as BATCH_MODES, M as BATCH_STATUES, M as BATCH_STATUSES, N as BankAccountWithLastSync, O as BankCode, Q as BatchInsertType, R as BatchLifecycle, S as BatchMode, T as BatchPayment, B as BatchSelectType, U as BatchStatus, V as CHARGE_BEARERS, W as CONNECTOR_KEYS, X as COUNTRY_CODES, Y as CREDENTIALS_TYPES, Z as ChargeBearer, _ as CompletedBatch, C as ConfigEnvironmentBank, $ as CountryCode, a0 as CredentialsType, d as CurrencyCode, a1 as INSTRUCTION_PRIORITIES, a2 as InstructionPriority, L as LastSyncMetadata, a3 as PAYMENT_DIRECTIONS, a4 as PAYMENT_REQUEST_STATUSES, a5 as PAYMENT_STATUSES, a6 as PAYMENT_TYPES, a7 as PaymentDirection, a8 as PaymentFailedInsertType, a9 as PaymentInsertType, aa as PaymentLifecycle, ab as PaymentPreparedInsertType, ac as PaymentStatus, ad as ProcessingBatch, ae as ReadyToSignBatch, af as ResolvedCredentials, ag as TOKEN_TYPES, ah as TokenType, ai as accountCredentialsInsertSchema, aj as accountCredentialsSelectSchema, ak as accountCredentialsUpdateSchema, al as accountInsertSchema, am as accountSelectSchema, an as accountUpdateSchema, ao as hasPaymentAccountAssigned, ap as isBatchAuthorized, aq as isBatchCompleted, ar as isBatchFailed, as as isBatchInitiated, at as isBatchProcessing, au as isBatchReadyToSign, av as isPaymentCompleted, aw as isPendingStatus, ax as isProcessedStatus, ay as isTerminalStatus } from './shared/bank.COez_hEH.mjs';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.t019WQuV.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.t019WQuV.mjs';
|
|
5
5
|
export { a as BankServiceEnv, b as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.Bz4DIxJL.mjs';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_zod from 'drizzle-zod';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, b as ConnectorKey, f as ConnectedAccount, c as PaymentType, g as CredentialsResolver, h as AccountCredentialsInsertType, i as AccountInsertType, j as BatchedPayment, k as InitiatedBatch, l as IncomingPayment, m as InitiatedPayment, A as AccountSelectType, n as ParsedBankPayment, o as PaymentRequestStatus, p as AuthorizationCallbackResult, q as BatchMetadata, r as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, s as AccountAssignedPayment, u as PreparedPayment, v as CompletedPayment, w as PaymentRequestInsertType } from './shared/bank.
|
|
2
|
-
export { x as ACCOUNT_STATUSES, y as AccountCredentialsPatchType, z as AccountCredentialsSelectType, D as AccountCredentialsUpdateType, E as AccountPatchType, F as AccountStatus, G as AccountUpdateType, J as AuthorizedBatch, K as BATCH_MODES, M as BATCH_STATUES, M as BATCH_STATUSES, N as BankAccountWithLastSync, O as BankCode, Q as BatchInsertType, R as BatchLifecycle, S as BatchMode, T as BatchPayment, B as BatchSelectType, U as BatchStatus, V as CHARGE_BEARERS, W as CONNECTOR_KEYS, X as COUNTRY_CODES, Y as CREDENTIALS_TYPES, Z as ChargeBearer, _ as CompletedBatch, C as ConfigEnvironmentBank, $ as CountryCode, a0 as CredentialsType, d as CurrencyCode, a1 as INSTRUCTION_PRIORITIES, a2 as InstructionPriority, L as LastSyncMetadata, a3 as PAYMENT_DIRECTIONS, a4 as PAYMENT_REQUEST_STATUSES, a5 as PAYMENT_STATUSES, a6 as PAYMENT_TYPES, a7 as PaymentDirection, a8 as PaymentFailedInsertType, a9 as PaymentInsertType, aa as PaymentLifecycle, ab as PaymentPreparedInsertType, ac as PaymentStatus, ad as ProcessingBatch, ae as ReadyToSignBatch, af as ResolvedCredentials, ag as TOKEN_TYPES, ah as TokenType, ai as accountCredentialsInsertSchema, aj as accountCredentialsSelectSchema, ak as accountCredentialsUpdateSchema, al as accountInsertSchema, am as accountSelectSchema, an as accountUpdateSchema, ao as hasPaymentAccountAssigned, ap as isBatchAuthorized, aq as isBatchCompleted, ar as isBatchFailed, as as isBatchInitiated, at as isBatchProcessing, au as isBatchReadyToSign, av as isPaymentCompleted, aw as isPendingStatus, ax as isProcessedStatus, ay 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, b as ConnectorKey, f as ConnectedAccount, c as PaymentType, g as CredentialsResolver, h as AccountCredentialsInsertType, i as AccountInsertType, j as BatchedPayment, k as InitiatedBatch, l as IncomingPayment, m as InitiatedPayment, A as AccountSelectType, n as ParsedBankPayment, o as PaymentRequestStatus, p as AuthorizationCallbackResult, q as BatchMetadata, r as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, s as AccountAssignedPayment, u as PreparedPayment, v as CompletedPayment, w as PaymentRequestInsertType } from './shared/bank.COez_hEH.js';
|
|
2
|
+
export { x as ACCOUNT_STATUSES, y as AccountCredentialsPatchType, z as AccountCredentialsSelectType, D as AccountCredentialsUpdateType, E as AccountPatchType, F as AccountStatus, G as AccountUpdateType, J as AuthorizedBatch, K as BATCH_MODES, M as BATCH_STATUES, M as BATCH_STATUSES, N as BankAccountWithLastSync, O as BankCode, Q as BatchInsertType, R as BatchLifecycle, S as BatchMode, T as BatchPayment, B as BatchSelectType, U as BatchStatus, V as CHARGE_BEARERS, W as CONNECTOR_KEYS, X as COUNTRY_CODES, Y as CREDENTIALS_TYPES, Z as ChargeBearer, _ as CompletedBatch, C as ConfigEnvironmentBank, $ as CountryCode, a0 as CredentialsType, d as CurrencyCode, a1 as INSTRUCTION_PRIORITIES, a2 as InstructionPriority, L as LastSyncMetadata, a3 as PAYMENT_DIRECTIONS, a4 as PAYMENT_REQUEST_STATUSES, a5 as PAYMENT_STATUSES, a6 as PAYMENT_TYPES, a7 as PaymentDirection, a8 as PaymentFailedInsertType, a9 as PaymentInsertType, aa as PaymentLifecycle, ab as PaymentPreparedInsertType, ac as PaymentStatus, ad as ProcessingBatch, ae as ReadyToSignBatch, af as ResolvedCredentials, ag as TOKEN_TYPES, ah as TokenType, ai as accountCredentialsInsertSchema, aj as accountCredentialsSelectSchema, ak as accountCredentialsUpdateSchema, al as accountInsertSchema, am as accountSelectSchema, an as accountUpdateSchema, ao as hasPaymentAccountAssigned, ap as isBatchAuthorized, aq as isBatchCompleted, ar as isBatchFailed, as as isBatchInitiated, at as isBatchProcessing, au as isBatchReadyToSign, av as isPaymentCompleted, aw as isPendingStatus, ax as isProcessedStatus, ay as isTerminalStatus } from './shared/bank.COez_hEH.js';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.VB_ZSWGd.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.VB_ZSWGd.js';
|
|
5
5
|
export { a as BankServiceEnv, b as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.Bz4DIxJL.js';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_zod from 'drizzle-zod';
|
package/dist/types.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { 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 assignAccount, s as signFinbricksJws, t as toBatchedPayment, e as toBatchedPaymentFromPaymentRequest, f as toCompletedPayment, g as toIncomingPayment, h as toPaymentRequestInsert, i as toPreparedPayment, u as useFinbricksFetch } from './shared/bank.
|
|
1
|
+
export { 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 assignAccount, s as signFinbricksJws, t as toBatchedPayment, e as toBatchedPaymentFromPaymentRequest, f as toCompletedPayment, g as toIncomingPayment, h as toPaymentRequestInsert, i as toPreparedPayment, u as useFinbricksFetch } from './shared/bank.aSyaZEZI.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, h as accountCredentialsInsertSchema, i as accountCredentialsSelectSchema, j as accountCredentialsUpdateSchema, k as accountInsertSchema, l as accountSelectSchema, m as accountUpdateSchema, n as hasPaymentAccountAssigned, o as isPaymentCompleted, p as isPendingStatus, q as isProcessedStatus, r as isTerminalStatus, s as ottInsertSchema, t as ottSelectSchema, u as ottUpdateSchema } from './shared/bank.C7MA33AX.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';
|