@develit-services/bank 6.1.3 → 6.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.cjs +9 -3
- package/dist/base.d.cts +11 -11
- package/dist/base.d.mts +11 -11
- package/dist/base.d.ts +11 -11
- package/dist/base.mjs +9 -3
- 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/workflows.cjs +2 -2
- package/dist/export/workflows.mjs +2 -2
- package/dist/shared/{bank.BBNHHD0v.d.mts → bank.BW_2lyPj.d.mts} +1 -1
- package/dist/shared/{bank.Dtw4Amqo.d.cts → bank.CRQln83_.d.cts} +1 -1
- package/dist/shared/{bank.Dzl159tr.cjs → bank.CUpE2dDT.cjs} +13 -5
- package/dist/shared/{bank.Bwe8T2eH.cjs → bank.CgtmsGme.cjs} +1 -1
- package/dist/shared/{bank.BO2rCT2t.d.ts → bank.Cu_7g0PZ.d.ts} +1 -1
- package/dist/shared/{bank.B-y4t5NI.mjs → bank.DOriJdJs.mjs} +13 -5
- package/dist/shared/{bank.BCO2CIVM.mjs → bank.DrAb7VfO.mjs} +1 -1
- package/dist/shared/{bank.C7zoSV8F.d.cts → bank.r1xIlFBl.d.cts} +3 -3
- package/dist/shared/{bank.C7zoSV8F.d.mts → bank.r1xIlFBl.d.mts} +3 -3
- package/dist/shared/{bank.C7zoSV8F.d.ts → bank.r1xIlFBl.d.ts} +3 -3
- package/dist/types.cjs +1 -1
- package/dist/types.d.cts +5 -5
- package/dist/types.d.mts +5 -5
- package/dist/types.d.ts +5 -5
- package/dist/types.mjs +1 -1
- package/package.json +1 -1
package/dist/base.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
|
-
const paymentDirection = require('./shared/bank.
|
|
4
|
+
const paymentDirection = require('./shared/bank.CUpE2dDT.cjs');
|
|
5
5
|
const drizzleOrm = require('drizzle-orm');
|
|
6
6
|
const cloudflare_workers = require('cloudflare:workers');
|
|
7
7
|
const d1 = require('drizzle-orm/d1');
|
|
8
8
|
require('jose');
|
|
9
|
-
const bank = require('./shared/bank.
|
|
9
|
+
const bank = require('./shared/bank.CgtmsGme.cjs');
|
|
10
10
|
const zod = require('zod');
|
|
11
11
|
const database_schema = require('./shared/bank.Ca3jzmIb.cjs');
|
|
12
12
|
const generalCodes = require('@develit-io/general-codes');
|
|
@@ -1384,11 +1384,17 @@ exports.BankServiceBase = class BankServiceBase extends backendSdk.develitWorker
|
|
|
1384
1384
|
});
|
|
1385
1385
|
const result = connector.parseAuthorizationCallback(callbackUrl);
|
|
1386
1386
|
if (!result.success) {
|
|
1387
|
+
this.logError({
|
|
1388
|
+
message: `[handleAuthorizationCallback] Authorization failed for PR ${paymentRequestId ?? "unknown"} (batch ${batchId ?? "none"}) on connector ${connectorKey}`,
|
|
1389
|
+
error: result.error,
|
|
1390
|
+
code: result.code,
|
|
1391
|
+
callbackParams: Object.fromEntries(params.entries())
|
|
1392
|
+
});
|
|
1387
1393
|
if (paymentRequestId) {
|
|
1388
1394
|
try {
|
|
1389
1395
|
await bank.updatePaymentRequestStatusCommand(this.db, {
|
|
1390
1396
|
id: paymentRequestId,
|
|
1391
|
-
statusReason: `Authorization error: ${result.error}`
|
|
1397
|
+
statusReason: `Authorization error: ${result.error}${result.code ? ` (code: ${result.code})` : ""}`
|
|
1392
1398
|
}).command.execute();
|
|
1393
1399
|
} catch (err) {
|
|
1394
1400
|
this.logError({
|
package/dist/base.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.
|
|
4
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.
|
|
3
|
+
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.r1xIlFBl.cjs';
|
|
4
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.CRQln83_.cjs';
|
|
5
5
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
6
6
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
7
7
|
import { z } from 'zod';
|
|
@@ -2699,9 +2699,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2699
2699
|
limit: z.ZodNumber;
|
|
2700
2700
|
sort: z.ZodObject<{
|
|
2701
2701
|
column: z.ZodEnum<{
|
|
2702
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2702
2703
|
createdAt: "createdAt";
|
|
2703
2704
|
updatedAt: "updatedAt";
|
|
2704
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2705
2705
|
}>;
|
|
2706
2706
|
direction: z.ZodEnum<{
|
|
2707
2707
|
asc: "asc";
|
|
@@ -2711,15 +2711,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2711
2711
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2712
2712
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2713
2713
|
AUTHORIZED: "AUTHORIZED";
|
|
2714
|
-
COMPLETED: "COMPLETED";
|
|
2715
2714
|
PROCESSING: "PROCESSING";
|
|
2716
2715
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2716
|
+
COMPLETED: "COMPLETED";
|
|
2717
2717
|
FAILED: "FAILED";
|
|
2718
2718
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2719
2719
|
AUTHORIZED: "AUTHORIZED";
|
|
2720
|
-
COMPLETED: "COMPLETED";
|
|
2721
2720
|
PROCESSING: "PROCESSING";
|
|
2722
2721
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2722
|
+
COMPLETED: "COMPLETED";
|
|
2723
2723
|
FAILED: "FAILED";
|
|
2724
2724
|
}>>]>>;
|
|
2725
2725
|
}, z.core.$strip>;
|
|
@@ -2825,9 +2825,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2825
2825
|
limit: z.ZodNumber;
|
|
2826
2826
|
sort: z.ZodObject<{
|
|
2827
2827
|
column: z.ZodEnum<{
|
|
2828
|
-
amount: "amount";
|
|
2829
2828
|
createdAt: "createdAt";
|
|
2830
2829
|
updatedAt: "updatedAt";
|
|
2830
|
+
amount: "amount";
|
|
2831
2831
|
}>;
|
|
2832
2832
|
direction: z.ZodEnum<{
|
|
2833
2833
|
asc: "asc";
|
|
@@ -2956,19 +2956,19 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2956
2956
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2957
2957
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2958
2958
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2959
|
+
PROCESSING: "PROCESSING";
|
|
2959
2960
|
BOOKED: "BOOKED";
|
|
2960
2961
|
REJECTED: "REJECTED";
|
|
2961
2962
|
PENDING: "PENDING";
|
|
2962
|
-
PROCESSING: "PROCESSING";
|
|
2963
2963
|
CANCELLED: "CANCELLED";
|
|
2964
2964
|
SCHEDULED: "SCHEDULED";
|
|
2965
2965
|
HOLD: "HOLD";
|
|
2966
2966
|
INFO: "INFO";
|
|
2967
2967
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2968
|
+
PROCESSING: "PROCESSING";
|
|
2968
2969
|
BOOKED: "BOOKED";
|
|
2969
2970
|
REJECTED: "REJECTED";
|
|
2970
2971
|
PENDING: "PENDING";
|
|
2971
|
-
PROCESSING: "PROCESSING";
|
|
2972
2972
|
CANCELLED: "CANCELLED";
|
|
2973
2973
|
SCHEDULED: "SCHEDULED";
|
|
2974
2974
|
HOLD: "HOLD";
|
|
@@ -3892,9 +3892,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3892
3892
|
limit: z.ZodNumber;
|
|
3893
3893
|
sort: z.ZodObject<{
|
|
3894
3894
|
column: z.ZodEnum<{
|
|
3895
|
-
amount: "amount";
|
|
3896
3895
|
createdAt: "createdAt";
|
|
3897
3896
|
updatedAt: "updatedAt";
|
|
3897
|
+
amount: "amount";
|
|
3898
3898
|
}>;
|
|
3899
3899
|
direction: z.ZodEnum<{
|
|
3900
3900
|
asc: "asc";
|
|
@@ -3903,17 +3903,17 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3903
3903
|
}, z.core.$strip>;
|
|
3904
3904
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3905
3905
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3906
|
-
OPENED: "OPENED";
|
|
3907
3906
|
AUTHORIZED: "AUTHORIZED";
|
|
3908
3907
|
COMPLETED: "COMPLETED";
|
|
3908
|
+
OPENED: "OPENED";
|
|
3909
3909
|
BOOKED: "BOOKED";
|
|
3910
3910
|
SETTLED: "SETTLED";
|
|
3911
3911
|
REJECTED: "REJECTED";
|
|
3912
3912
|
CLOSED: "CLOSED";
|
|
3913
3913
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3914
|
-
OPENED: "OPENED";
|
|
3915
3914
|
AUTHORIZED: "AUTHORIZED";
|
|
3916
3915
|
COMPLETED: "COMPLETED";
|
|
3916
|
+
OPENED: "OPENED";
|
|
3917
3917
|
BOOKED: "BOOKED";
|
|
3918
3918
|
SETTLED: "SETTLED";
|
|
3919
3919
|
REJECTED: "REJECTED";
|
package/dist/base.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.
|
|
4
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.
|
|
3
|
+
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.r1xIlFBl.mjs';
|
|
4
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.BW_2lyPj.mjs';
|
|
5
5
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
6
6
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
7
7
|
import { z } from 'zod';
|
|
@@ -2699,9 +2699,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2699
2699
|
limit: z.ZodNumber;
|
|
2700
2700
|
sort: z.ZodObject<{
|
|
2701
2701
|
column: z.ZodEnum<{
|
|
2702
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2702
2703
|
createdAt: "createdAt";
|
|
2703
2704
|
updatedAt: "updatedAt";
|
|
2704
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2705
2705
|
}>;
|
|
2706
2706
|
direction: z.ZodEnum<{
|
|
2707
2707
|
asc: "asc";
|
|
@@ -2711,15 +2711,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2711
2711
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2712
2712
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2713
2713
|
AUTHORIZED: "AUTHORIZED";
|
|
2714
|
-
COMPLETED: "COMPLETED";
|
|
2715
2714
|
PROCESSING: "PROCESSING";
|
|
2716
2715
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2716
|
+
COMPLETED: "COMPLETED";
|
|
2717
2717
|
FAILED: "FAILED";
|
|
2718
2718
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2719
2719
|
AUTHORIZED: "AUTHORIZED";
|
|
2720
|
-
COMPLETED: "COMPLETED";
|
|
2721
2720
|
PROCESSING: "PROCESSING";
|
|
2722
2721
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2722
|
+
COMPLETED: "COMPLETED";
|
|
2723
2723
|
FAILED: "FAILED";
|
|
2724
2724
|
}>>]>>;
|
|
2725
2725
|
}, z.core.$strip>;
|
|
@@ -2825,9 +2825,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2825
2825
|
limit: z.ZodNumber;
|
|
2826
2826
|
sort: z.ZodObject<{
|
|
2827
2827
|
column: z.ZodEnum<{
|
|
2828
|
-
amount: "amount";
|
|
2829
2828
|
createdAt: "createdAt";
|
|
2830
2829
|
updatedAt: "updatedAt";
|
|
2830
|
+
amount: "amount";
|
|
2831
2831
|
}>;
|
|
2832
2832
|
direction: z.ZodEnum<{
|
|
2833
2833
|
asc: "asc";
|
|
@@ -2956,19 +2956,19 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2956
2956
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2957
2957
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2958
2958
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2959
|
+
PROCESSING: "PROCESSING";
|
|
2959
2960
|
BOOKED: "BOOKED";
|
|
2960
2961
|
REJECTED: "REJECTED";
|
|
2961
2962
|
PENDING: "PENDING";
|
|
2962
|
-
PROCESSING: "PROCESSING";
|
|
2963
2963
|
CANCELLED: "CANCELLED";
|
|
2964
2964
|
SCHEDULED: "SCHEDULED";
|
|
2965
2965
|
HOLD: "HOLD";
|
|
2966
2966
|
INFO: "INFO";
|
|
2967
2967
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2968
|
+
PROCESSING: "PROCESSING";
|
|
2968
2969
|
BOOKED: "BOOKED";
|
|
2969
2970
|
REJECTED: "REJECTED";
|
|
2970
2971
|
PENDING: "PENDING";
|
|
2971
|
-
PROCESSING: "PROCESSING";
|
|
2972
2972
|
CANCELLED: "CANCELLED";
|
|
2973
2973
|
SCHEDULED: "SCHEDULED";
|
|
2974
2974
|
HOLD: "HOLD";
|
|
@@ -3892,9 +3892,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3892
3892
|
limit: z.ZodNumber;
|
|
3893
3893
|
sort: z.ZodObject<{
|
|
3894
3894
|
column: z.ZodEnum<{
|
|
3895
|
-
amount: "amount";
|
|
3896
3895
|
createdAt: "createdAt";
|
|
3897
3896
|
updatedAt: "updatedAt";
|
|
3897
|
+
amount: "amount";
|
|
3898
3898
|
}>;
|
|
3899
3899
|
direction: z.ZodEnum<{
|
|
3900
3900
|
asc: "asc";
|
|
@@ -3903,17 +3903,17 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3903
3903
|
}, z.core.$strip>;
|
|
3904
3904
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3905
3905
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3906
|
-
OPENED: "OPENED";
|
|
3907
3906
|
AUTHORIZED: "AUTHORIZED";
|
|
3908
3907
|
COMPLETED: "COMPLETED";
|
|
3908
|
+
OPENED: "OPENED";
|
|
3909
3909
|
BOOKED: "BOOKED";
|
|
3910
3910
|
SETTLED: "SETTLED";
|
|
3911
3911
|
REJECTED: "REJECTED";
|
|
3912
3912
|
CLOSED: "CLOSED";
|
|
3913
3913
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3914
|
-
OPENED: "OPENED";
|
|
3915
3914
|
AUTHORIZED: "AUTHORIZED";
|
|
3916
3915
|
COMPLETED: "COMPLETED";
|
|
3916
|
+
OPENED: "OPENED";
|
|
3917
3917
|
BOOKED: "BOOKED";
|
|
3918
3918
|
SETTLED: "SETTLED";
|
|
3919
3919
|
REJECTED: "REJECTED";
|
package/dist/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.
|
|
4
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.
|
|
3
|
+
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.r1xIlFBl.js';
|
|
4
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.Cu_7g0PZ.js';
|
|
5
5
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
6
6
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
7
7
|
import { z } from 'zod';
|
|
@@ -2699,9 +2699,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2699
2699
|
limit: z.ZodNumber;
|
|
2700
2700
|
sort: z.ZodObject<{
|
|
2701
2701
|
column: z.ZodEnum<{
|
|
2702
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2702
2703
|
createdAt: "createdAt";
|
|
2703
2704
|
updatedAt: "updatedAt";
|
|
2704
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2705
2705
|
}>;
|
|
2706
2706
|
direction: z.ZodEnum<{
|
|
2707
2707
|
asc: "asc";
|
|
@@ -2711,15 +2711,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2711
2711
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2712
2712
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2713
2713
|
AUTHORIZED: "AUTHORIZED";
|
|
2714
|
-
COMPLETED: "COMPLETED";
|
|
2715
2714
|
PROCESSING: "PROCESSING";
|
|
2716
2715
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2716
|
+
COMPLETED: "COMPLETED";
|
|
2717
2717
|
FAILED: "FAILED";
|
|
2718
2718
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2719
2719
|
AUTHORIZED: "AUTHORIZED";
|
|
2720
|
-
COMPLETED: "COMPLETED";
|
|
2721
2720
|
PROCESSING: "PROCESSING";
|
|
2722
2721
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2722
|
+
COMPLETED: "COMPLETED";
|
|
2723
2723
|
FAILED: "FAILED";
|
|
2724
2724
|
}>>]>>;
|
|
2725
2725
|
}, z.core.$strip>;
|
|
@@ -2825,9 +2825,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2825
2825
|
limit: z.ZodNumber;
|
|
2826
2826
|
sort: z.ZodObject<{
|
|
2827
2827
|
column: z.ZodEnum<{
|
|
2828
|
-
amount: "amount";
|
|
2829
2828
|
createdAt: "createdAt";
|
|
2830
2829
|
updatedAt: "updatedAt";
|
|
2830
|
+
amount: "amount";
|
|
2831
2831
|
}>;
|
|
2832
2832
|
direction: z.ZodEnum<{
|
|
2833
2833
|
asc: "asc";
|
|
@@ -2956,19 +2956,19 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2956
2956
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2957
2957
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2958
2958
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2959
|
+
PROCESSING: "PROCESSING";
|
|
2959
2960
|
BOOKED: "BOOKED";
|
|
2960
2961
|
REJECTED: "REJECTED";
|
|
2961
2962
|
PENDING: "PENDING";
|
|
2962
|
-
PROCESSING: "PROCESSING";
|
|
2963
2963
|
CANCELLED: "CANCELLED";
|
|
2964
2964
|
SCHEDULED: "SCHEDULED";
|
|
2965
2965
|
HOLD: "HOLD";
|
|
2966
2966
|
INFO: "INFO";
|
|
2967
2967
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2968
|
+
PROCESSING: "PROCESSING";
|
|
2968
2969
|
BOOKED: "BOOKED";
|
|
2969
2970
|
REJECTED: "REJECTED";
|
|
2970
2971
|
PENDING: "PENDING";
|
|
2971
|
-
PROCESSING: "PROCESSING";
|
|
2972
2972
|
CANCELLED: "CANCELLED";
|
|
2973
2973
|
SCHEDULED: "SCHEDULED";
|
|
2974
2974
|
HOLD: "HOLD";
|
|
@@ -3892,9 +3892,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3892
3892
|
limit: z.ZodNumber;
|
|
3893
3893
|
sort: z.ZodObject<{
|
|
3894
3894
|
column: z.ZodEnum<{
|
|
3895
|
-
amount: "amount";
|
|
3896
3895
|
createdAt: "createdAt";
|
|
3897
3896
|
updatedAt: "updatedAt";
|
|
3897
|
+
amount: "amount";
|
|
3898
3898
|
}>;
|
|
3899
3899
|
direction: z.ZodEnum<{
|
|
3900
3900
|
asc: "asc";
|
|
@@ -3903,17 +3903,17 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3903
3903
|
}, z.core.$strip>;
|
|
3904
3904
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3905
3905
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3906
|
-
OPENED: "OPENED";
|
|
3907
3906
|
AUTHORIZED: "AUTHORIZED";
|
|
3908
3907
|
COMPLETED: "COMPLETED";
|
|
3908
|
+
OPENED: "OPENED";
|
|
3909
3909
|
BOOKED: "BOOKED";
|
|
3910
3910
|
SETTLED: "SETTLED";
|
|
3911
3911
|
REJECTED: "REJECTED";
|
|
3912
3912
|
CLOSED: "CLOSED";
|
|
3913
3913
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3914
|
-
OPENED: "OPENED";
|
|
3915
3914
|
AUTHORIZED: "AUTHORIZED";
|
|
3916
3915
|
COMPLETED: "COMPLETED";
|
|
3916
|
+
OPENED: "OPENED";
|
|
3917
3917
|
BOOKED: "BOOKED";
|
|
3918
3918
|
SETTLED: "SETTLED";
|
|
3919
3919
|
REJECTED: "REJECTED";
|
package/dist/base.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { uuidv4, first, buildMultiFilterConditions as buildMultiFilterConditions$1, bankAccountMetadataSchema, structuredAddressSchema, workflowInstanceStatusSchema, develitWorker, createInternalError, action, service } from '@develit-io/backend-sdk';
|
|
2
|
-
import { G as tables, g as accountInsertSchema, H as relations, o as isProcessedStatus, p as isTerminalStatus, L as getNonTerminalPaymentRequestsQuery, x as toIncomingPayment, N as calculateCzechIban, j as assignAccount, u as toBatchedPayment, y as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from './shared/bank.
|
|
2
|
+
import { G as tables, g as accountInsertSchema, H as relations, o as isProcessedStatus, p as isTerminalStatus, L as getNonTerminalPaymentRequestsQuery, x as toIncomingPayment, N as calculateCzechIban, j as assignAccount, u as toBatchedPayment, y as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from './shared/bank.DOriJdJs.mjs';
|
|
3
3
|
import { eq, sql, and, like, asc, desc, inArray, gte, lte, isNull, count } from 'drizzle-orm';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { drizzle } from 'drizzle-orm/d1';
|
|
6
6
|
import 'jose';
|
|
7
|
-
import { h as encrypt, d as createCredentialsResolver, i as initiateConnector, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, j as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from './shared/bank.
|
|
7
|
+
import { h as encrypt, d as createCredentialsResolver, i as initiateConnector, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, j as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from './shared/bank.DrAb7VfO.mjs';
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
import { I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, g as PAYMENT_TYPES, b as CONNECTOR_KEYS, a as BATCH_STATUSES, f as PAYMENT_STATUSES, P as PAYMENT_DIRECTIONS, e as PAYMENT_REQUEST_STATUSES } from './shared/bank.BT7HayCV.mjs';
|
|
10
10
|
import { CURRENCY_CODES } from '@develit-io/general-codes';
|
|
@@ -1382,11 +1382,17 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
1382
1382
|
});
|
|
1383
1383
|
const result = connector.parseAuthorizationCallback(callbackUrl);
|
|
1384
1384
|
if (!result.success) {
|
|
1385
|
+
this.logError({
|
|
1386
|
+
message: `[handleAuthorizationCallback] Authorization failed for PR ${paymentRequestId ?? "unknown"} (batch ${batchId ?? "none"}) on connector ${connectorKey}`,
|
|
1387
|
+
error: result.error,
|
|
1388
|
+
code: result.code,
|
|
1389
|
+
callbackParams: Object.fromEntries(params.entries())
|
|
1390
|
+
});
|
|
1385
1391
|
if (paymentRequestId) {
|
|
1386
1392
|
try {
|
|
1387
1393
|
await updatePaymentRequestStatusCommand(this.db, {
|
|
1388
1394
|
id: paymentRequestId,
|
|
1389
|
-
statusReason: `Authorization error: ${result.error}`
|
|
1395
|
+
statusReason: `Authorization error: ${result.error}${result.code ? ` (code: ${result.code})` : ""}`
|
|
1390
1396
|
}).command.execute();
|
|
1391
1397
|
} catch (err) {
|
|
1392
1398
|
this.logError({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.
|
|
1
|
+
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.r1xIlFBl.cjs';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import '@develit-io/general-codes';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.
|
|
1
|
+
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.r1xIlFBl.mjs';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import '@develit-io/general-codes';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.
|
|
1
|
+
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.r1xIlFBl.js';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import '@develit-io/general-codes';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
|
-
const paymentDirection = require('../shared/bank.
|
|
4
|
+
const paymentDirection = require('../shared/bank.CUpE2dDT.cjs');
|
|
5
5
|
const batchLifecycle = require('../shared/bank.NF8bZBy0.cjs');
|
|
6
6
|
const drizzleOrm = require('drizzle-orm');
|
|
7
|
-
const bank = require('../shared/bank.
|
|
7
|
+
const bank = require('../shared/bank.CgtmsGme.cjs');
|
|
8
8
|
const cloudflare_workers = require('cloudflare:workers');
|
|
9
9
|
const cloudflare_workflows = require('cloudflare:workflows');
|
|
10
10
|
const d1 = require('drizzle-orm/d1');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { first, uuidv4, asNonEmpty } from '@develit-io/backend-sdk';
|
|
2
|
-
import { G as tables, H as relations, v as toBatchedPaymentFromPaymentRequest, z as toPreparedPayment, m as isPaymentCompleted } from '../shared/bank.
|
|
2
|
+
import { G as tables, H as relations, v as toBatchedPaymentFromPaymentRequest, z as toPreparedPayment, m as isPaymentCompleted } from '../shared/bank.DOriJdJs.mjs';
|
|
3
3
|
import { i as isBatchAuthorized, b as isBatchFailed, d as isBatchProcessing } from '../shared/bank.XqSw509X.mjs';
|
|
4
4
|
import { sql, and, eq, inArray } from 'drizzle-orm';
|
|
5
|
-
import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, i as initiateConnector, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.
|
|
5
|
+
import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, i as initiateConnector, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.DrAb7VfO.mjs';
|
|
6
6
|
import { WorkflowEntrypoint } from 'cloudflare:workers';
|
|
7
7
|
import { NonRetryableError } from 'cloudflare:workflows';
|
|
8
8
|
import { drizzle } from 'drizzle-orm/d1';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.
|
|
1
|
+
import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.r1xIlFBl.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
|
|
@@ -1,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.r1xIlFBl.cjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
|
|
@@ -56,7 +56,7 @@ function buildFinbricksApiError(args) {
|
|
|
56
56
|
httpStatusText: args.httpStatusText,
|
|
57
57
|
code: typeof env.code === "number" ? env.code : void 0,
|
|
58
58
|
finbricksMessage: typeof env.message === "string" ? env.message : void 0,
|
|
59
|
-
xrequestId: typeof env.xrequestId === "string" ? env.xrequestId : void 0,
|
|
59
|
+
xrequestId: typeof env.xrequestId === "string" ? env.xrequestId : args.requestId ?? void 0,
|
|
60
60
|
body: args.body
|
|
61
61
|
});
|
|
62
62
|
}
|
|
@@ -168,15 +168,18 @@ const useFinbricksFetch = async (config, init) => {
|
|
|
168
168
|
redactedBody = redactFinbricksPayload(JSON.parse(text));
|
|
169
169
|
} catch {
|
|
170
170
|
}
|
|
171
|
+
const responseRequestId = res.headers.get("x-request-id");
|
|
171
172
|
console.error("[Finbricks] error response", {
|
|
172
173
|
status: res.status,
|
|
173
174
|
statusText: res.statusText,
|
|
174
175
|
url: url.toString(),
|
|
176
|
+
requestId: responseRequestId,
|
|
175
177
|
body: redactedBody
|
|
176
178
|
});
|
|
177
179
|
throw buildFinbricksApiError({
|
|
178
180
|
httpStatus: res.status,
|
|
179
181
|
httpStatusText: res.statusText,
|
|
182
|
+
requestId: responseRequestId,
|
|
180
183
|
body: redactedBody
|
|
181
184
|
});
|
|
182
185
|
}
|
|
@@ -219,7 +222,7 @@ const FINBRICKS_ENDPOINTS = {
|
|
|
219
222
|
ACCOUNT_LIST: "/account/list",
|
|
220
223
|
ACCOUNT_BALANCE: "/account/balance",
|
|
221
224
|
ACCOUNT_TRANSACTIONS: "/account/transactions",
|
|
222
|
-
TRANSACTION_INIT: "/transaction/platform/init",
|
|
225
|
+
TRANSACTION_INIT: "/transaction/platform/domestic/init",
|
|
223
226
|
TRANSACTION_STATUS: "/transaction/platform/status",
|
|
224
227
|
TRANSACTION_SEPA_INIT: "/transaction/platform/sepa/init",
|
|
225
228
|
TRANSACTION_FOREIGN_INIT: "/transaction/platform/foreign/init",
|
|
@@ -1350,7 +1353,9 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1350
1353
|
payment.creditor,
|
|
1351
1354
|
udtOptions
|
|
1352
1355
|
) : payment.message?.trim() || void 0;
|
|
1353
|
-
const unstructured = this.PROVIDER === "CSOB" && (composed?.length ?? 0) < 3 ? "Platba" : composed;
|
|
1356
|
+
const unstructured = this.PROVIDER === "CSOB" && (composed?.length ?? 0) < 3 ? "Platba" : composed?.slice(0, 140);
|
|
1357
|
+
const creditorAddress = mapToFinbricksAddress(payment.creditor.address);
|
|
1358
|
+
const bankRefId = backendSdk.uuidv4();
|
|
1354
1359
|
const [response, error] = await backendSdk.useResult(
|
|
1355
1360
|
this.finbricks.request({
|
|
1356
1361
|
endpoint: FINBRICKS_ENDPOINTS.TRANSACTION_INIT,
|
|
@@ -1362,7 +1367,7 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1362
1367
|
// clientId,
|
|
1363
1368
|
},
|
|
1364
1369
|
paymentIdentification: {
|
|
1365
|
-
merchantTransactionId:
|
|
1370
|
+
merchantTransactionId: bankRefId,
|
|
1366
1371
|
czechSymbols: {
|
|
1367
1372
|
variableSymbol: payment.vs ?? (payment.ss ? void 0 : autoVariableSymbol(payment.id)),
|
|
1368
1373
|
specificSymbol: payment.ss ?? void 0,
|
|
@@ -1377,11 +1382,13 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1377
1382
|
...debtorIban && {
|
|
1378
1383
|
accountIdentification: { value: debtorIban, type: "IBAN" }
|
|
1379
1384
|
},
|
|
1385
|
+
debtorName: payment.debtor.holderName?.slice(0, 100),
|
|
1380
1386
|
paymentProvider: this.PROVIDER
|
|
1381
1387
|
},
|
|
1382
1388
|
creditor: {
|
|
1383
1389
|
accountIdentification: { value: creditorIban, type: "IBAN" },
|
|
1384
|
-
creditorName: payment.creditor.holderName.slice(0, 100)
|
|
1390
|
+
creditorName: payment.creditor.holderName.slice(0, 100),
|
|
1391
|
+
...creditorAddress && { postalAddress: creditorAddress }
|
|
1385
1392
|
},
|
|
1386
1393
|
...unstructured && { remittanceInformation: { unstructured } },
|
|
1387
1394
|
callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`,
|
|
@@ -1399,6 +1406,7 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1399
1406
|
authorizationUrl: response.redirectUrl,
|
|
1400
1407
|
payment: {
|
|
1401
1408
|
...payment,
|
|
1409
|
+
bankRefId,
|
|
1402
1410
|
status: "OPENED",
|
|
1403
1411
|
initiatedAt: /* @__PURE__ */ new Date()
|
|
1404
1412
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const drizzleOrm = require('drizzle-orm');
|
|
4
|
-
const paymentDirection = require('./bank.
|
|
4
|
+
const paymentDirection = require('./bank.CUpE2dDT.cjs');
|
|
5
5
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
6
6
|
require('./bank.Ca3jzmIb.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.r1xIlFBl.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
|
|
@@ -54,7 +54,7 @@ function buildFinbricksApiError(args) {
|
|
|
54
54
|
httpStatusText: args.httpStatusText,
|
|
55
55
|
code: typeof env.code === "number" ? env.code : void 0,
|
|
56
56
|
finbricksMessage: typeof env.message === "string" ? env.message : void 0,
|
|
57
|
-
xrequestId: typeof env.xrequestId === "string" ? env.xrequestId : void 0,
|
|
57
|
+
xrequestId: typeof env.xrequestId === "string" ? env.xrequestId : args.requestId ?? void 0,
|
|
58
58
|
body: args.body
|
|
59
59
|
});
|
|
60
60
|
}
|
|
@@ -166,15 +166,18 @@ const useFinbricksFetch = async (config, init) => {
|
|
|
166
166
|
redactedBody = redactFinbricksPayload(JSON.parse(text));
|
|
167
167
|
} catch {
|
|
168
168
|
}
|
|
169
|
+
const responseRequestId = res.headers.get("x-request-id");
|
|
169
170
|
console.error("[Finbricks] error response", {
|
|
170
171
|
status: res.status,
|
|
171
172
|
statusText: res.statusText,
|
|
172
173
|
url: url.toString(),
|
|
174
|
+
requestId: responseRequestId,
|
|
173
175
|
body: redactedBody
|
|
174
176
|
});
|
|
175
177
|
throw buildFinbricksApiError({
|
|
176
178
|
httpStatus: res.status,
|
|
177
179
|
httpStatusText: res.statusText,
|
|
180
|
+
requestId: responseRequestId,
|
|
178
181
|
body: redactedBody
|
|
179
182
|
});
|
|
180
183
|
}
|
|
@@ -217,7 +220,7 @@ const FINBRICKS_ENDPOINTS = {
|
|
|
217
220
|
ACCOUNT_LIST: "/account/list",
|
|
218
221
|
ACCOUNT_BALANCE: "/account/balance",
|
|
219
222
|
ACCOUNT_TRANSACTIONS: "/account/transactions",
|
|
220
|
-
TRANSACTION_INIT: "/transaction/platform/init",
|
|
223
|
+
TRANSACTION_INIT: "/transaction/platform/domestic/init",
|
|
221
224
|
TRANSACTION_STATUS: "/transaction/platform/status",
|
|
222
225
|
TRANSACTION_SEPA_INIT: "/transaction/platform/sepa/init",
|
|
223
226
|
TRANSACTION_FOREIGN_INIT: "/transaction/platform/foreign/init",
|
|
@@ -1348,7 +1351,9 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1348
1351
|
payment.creditor,
|
|
1349
1352
|
udtOptions
|
|
1350
1353
|
) : payment.message?.trim() || void 0;
|
|
1351
|
-
const unstructured = this.PROVIDER === "CSOB" && (composed?.length ?? 0) < 3 ? "Platba" : composed;
|
|
1354
|
+
const unstructured = this.PROVIDER === "CSOB" && (composed?.length ?? 0) < 3 ? "Platba" : composed?.slice(0, 140);
|
|
1355
|
+
const creditorAddress = mapToFinbricksAddress(payment.creditor.address);
|
|
1356
|
+
const bankRefId = uuidv4();
|
|
1352
1357
|
const [response, error] = await useResult(
|
|
1353
1358
|
this.finbricks.request({
|
|
1354
1359
|
endpoint: FINBRICKS_ENDPOINTS.TRANSACTION_INIT,
|
|
@@ -1360,7 +1365,7 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1360
1365
|
// clientId,
|
|
1361
1366
|
},
|
|
1362
1367
|
paymentIdentification: {
|
|
1363
|
-
merchantTransactionId:
|
|
1368
|
+
merchantTransactionId: bankRefId,
|
|
1364
1369
|
czechSymbols: {
|
|
1365
1370
|
variableSymbol: payment.vs ?? (payment.ss ? void 0 : autoVariableSymbol(payment.id)),
|
|
1366
1371
|
specificSymbol: payment.ss ?? void 0,
|
|
@@ -1375,11 +1380,13 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1375
1380
|
...debtorIban && {
|
|
1376
1381
|
accountIdentification: { value: debtorIban, type: "IBAN" }
|
|
1377
1382
|
},
|
|
1383
|
+
debtorName: payment.debtor.holderName?.slice(0, 100),
|
|
1378
1384
|
paymentProvider: this.PROVIDER
|
|
1379
1385
|
},
|
|
1380
1386
|
creditor: {
|
|
1381
1387
|
accountIdentification: { value: creditorIban, type: "IBAN" },
|
|
1382
|
-
creditorName: payment.creditor.holderName.slice(0, 100)
|
|
1388
|
+
creditorName: payment.creditor.holderName.slice(0, 100),
|
|
1389
|
+
...creditorAddress && { postalAddress: creditorAddress }
|
|
1383
1390
|
},
|
|
1384
1391
|
...unstructured && { remittanceInformation: { unstructured } },
|
|
1385
1392
|
callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`,
|
|
@@ -1397,6 +1404,7 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1397
1404
|
authorizationUrl: response.redirectUrl,
|
|
1398
1405
|
payment: {
|
|
1399
1406
|
...payment,
|
|
1407
|
+
bankRefId,
|
|
1400
1408
|
status: "OPENED",
|
|
1401
1409
|
initiatedAt: /* @__PURE__ */ new Date()
|
|
1402
1410
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sql, and, eq, isNull } from 'drizzle-orm';
|
|
2
|
-
import { G as tables, b as FinbricksConnector, J as buildEndToEndId, c as MockConnector, D as DbuConnector, C as CsobConnector, K as KBConnector, M as MockCobsConnector, E as ErsteConnector } from './bank.
|
|
2
|
+
import { G as tables, b as FinbricksConnector, J as buildEndToEndId, c as MockConnector, D as DbuConnector, C as CsobConnector, K as KBConnector, M as MockCobsConnector, E as ErsteConnector } from './bank.DOriJdJs.mjs';
|
|
3
3
|
import { uuidv4 } from '@develit-io/backend-sdk';
|
|
4
4
|
import './bank.BT7HayCV.mjs';
|
|
5
5
|
import 'date-fns';
|
|
@@ -3280,7 +3280,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3280
3280
|
name: string;
|
|
3281
3281
|
tableName: "batch";
|
|
3282
3282
|
dataType: "string enum";
|
|
3283
|
-
data: "AUTHORIZED" | "
|
|
3283
|
+
data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
|
|
3284
3284
|
driverParam: string;
|
|
3285
3285
|
notNull: false;
|
|
3286
3286
|
hasDefault: false;
|
|
@@ -3656,7 +3656,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3656
3656
|
name: string;
|
|
3657
3657
|
tableName: "payment";
|
|
3658
3658
|
dataType: "string enum";
|
|
3659
|
-
data: "
|
|
3659
|
+
data: "PROCESSING" | "BOOKED" | "REJECTED" | "PENDING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3660
3660
|
driverParam: string;
|
|
3661
3661
|
notNull: true;
|
|
3662
3662
|
hasDefault: false;
|
|
@@ -4160,7 +4160,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4160
4160
|
name: string;
|
|
4161
4161
|
tableName: "payment_request";
|
|
4162
4162
|
dataType: "string enum";
|
|
4163
|
-
data: "
|
|
4163
|
+
data: "AUTHORIZED" | "COMPLETED" | "OPENED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
4164
4164
|
driverParam: string;
|
|
4165
4165
|
notNull: true;
|
|
4166
4166
|
hasDefault: false;
|
|
@@ -3280,7 +3280,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3280
3280
|
name: string;
|
|
3281
3281
|
tableName: "batch";
|
|
3282
3282
|
dataType: "string enum";
|
|
3283
|
-
data: "AUTHORIZED" | "
|
|
3283
|
+
data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
|
|
3284
3284
|
driverParam: string;
|
|
3285
3285
|
notNull: false;
|
|
3286
3286
|
hasDefault: false;
|
|
@@ -3656,7 +3656,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3656
3656
|
name: string;
|
|
3657
3657
|
tableName: "payment";
|
|
3658
3658
|
dataType: "string enum";
|
|
3659
|
-
data: "
|
|
3659
|
+
data: "PROCESSING" | "BOOKED" | "REJECTED" | "PENDING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3660
3660
|
driverParam: string;
|
|
3661
3661
|
notNull: true;
|
|
3662
3662
|
hasDefault: false;
|
|
@@ -4160,7 +4160,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4160
4160
|
name: string;
|
|
4161
4161
|
tableName: "payment_request";
|
|
4162
4162
|
dataType: "string enum";
|
|
4163
|
-
data: "
|
|
4163
|
+
data: "AUTHORIZED" | "COMPLETED" | "OPENED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
4164
4164
|
driverParam: string;
|
|
4165
4165
|
notNull: true;
|
|
4166
4166
|
hasDefault: false;
|
|
@@ -3280,7 +3280,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3280
3280
|
name: string;
|
|
3281
3281
|
tableName: "batch";
|
|
3282
3282
|
dataType: "string enum";
|
|
3283
|
-
data: "AUTHORIZED" | "
|
|
3283
|
+
data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
|
|
3284
3284
|
driverParam: string;
|
|
3285
3285
|
notNull: false;
|
|
3286
3286
|
hasDefault: false;
|
|
@@ -3656,7 +3656,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3656
3656
|
name: string;
|
|
3657
3657
|
tableName: "payment";
|
|
3658
3658
|
dataType: "string enum";
|
|
3659
|
-
data: "
|
|
3659
|
+
data: "PROCESSING" | "BOOKED" | "REJECTED" | "PENDING" | "CANCELLED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3660
3660
|
driverParam: string;
|
|
3661
3661
|
notNull: true;
|
|
3662
3662
|
hasDefault: false;
|
|
@@ -4160,7 +4160,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4160
4160
|
name: string;
|
|
4161
4161
|
tableName: "payment_request";
|
|
4162
4162
|
dataType: "string enum";
|
|
4163
|
-
data: "
|
|
4163
|
+
data: "AUTHORIZED" | "COMPLETED" | "OPENED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
4164
4164
|
driverParam: string;
|
|
4165
4165
|
notNull: true;
|
|
4166
4166
|
hasDefault: false;
|
package/dist/types.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const paymentDirection = require('./shared/bank.
|
|
3
|
+
const paymentDirection = require('./shared/bank.CUpE2dDT.cjs');
|
|
4
4
|
const database_schema = require('./shared/bank.Ca3jzmIb.cjs');
|
|
5
5
|
const batchLifecycle = require('./shared/bank.NF8bZBy0.cjs');
|
|
6
6
|
const generalCodes = require('@develit-io/general-codes');
|
package/dist/types.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BankAccountMetadata, BaseEvent } from '@develit-io/backend-sdk';
|
|
2
|
-
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.
|
|
3
|
-
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.
|
|
4
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
5
|
-
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.
|
|
2
|
+
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.r1xIlFBl.cjs';
|
|
3
|
+
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.r1xIlFBl.cjs';
|
|
4
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.CRQln83_.cjs';
|
|
5
|
+
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.CRQln83_.cjs';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import * as drizzle_orm_zod from 'drizzle-orm/zod';
|
|
8
8
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
@@ -298,7 +298,7 @@ declare const FINBRICKS_ENDPOINTS: {
|
|
|
298
298
|
readonly ACCOUNT_LIST: "/account/list";
|
|
299
299
|
readonly ACCOUNT_BALANCE: "/account/balance";
|
|
300
300
|
readonly ACCOUNT_TRANSACTIONS: "/account/transactions";
|
|
301
|
-
readonly TRANSACTION_INIT: "/transaction/platform/init";
|
|
301
|
+
readonly TRANSACTION_INIT: "/transaction/platform/domestic/init";
|
|
302
302
|
readonly TRANSACTION_STATUS: "/transaction/platform/status";
|
|
303
303
|
readonly TRANSACTION_SEPA_INIT: "/transaction/platform/sepa/init";
|
|
304
304
|
readonly TRANSACTION_FOREIGN_INIT: "/transaction/platform/foreign/init";
|
package/dist/types.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BankAccountMetadata, BaseEvent } from '@develit-io/backend-sdk';
|
|
2
|
-
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.
|
|
3
|
-
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.
|
|
4
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
5
|
-
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.
|
|
2
|
+
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.r1xIlFBl.mjs';
|
|
3
|
+
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.r1xIlFBl.mjs';
|
|
4
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.BW_2lyPj.mjs';
|
|
5
|
+
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.BW_2lyPj.mjs';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import * as drizzle_orm_zod from 'drizzle-orm/zod';
|
|
8
8
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
@@ -298,7 +298,7 @@ declare const FINBRICKS_ENDPOINTS: {
|
|
|
298
298
|
readonly ACCOUNT_LIST: "/account/list";
|
|
299
299
|
readonly ACCOUNT_BALANCE: "/account/balance";
|
|
300
300
|
readonly ACCOUNT_TRANSACTIONS: "/account/transactions";
|
|
301
|
-
readonly TRANSACTION_INIT: "/transaction/platform/init";
|
|
301
|
+
readonly TRANSACTION_INIT: "/transaction/platform/domestic/init";
|
|
302
302
|
readonly TRANSACTION_STATUS: "/transaction/platform/status";
|
|
303
303
|
readonly TRANSACTION_SEPA_INIT: "/transaction/platform/sepa/init";
|
|
304
304
|
readonly TRANSACTION_FOREIGN_INIT: "/transaction/platform/foreign/init";
|
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BankAccountMetadata, BaseEvent } from '@develit-io/backend-sdk';
|
|
2
|
-
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.
|
|
3
|
-
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.
|
|
4
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
5
|
-
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.
|
|
2
|
+
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.r1xIlFBl.js';
|
|
3
|
+
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.r1xIlFBl.js';
|
|
4
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.Cu_7g0PZ.js';
|
|
5
|
+
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.Cu_7g0PZ.js';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import * as drizzle_orm_zod from 'drizzle-orm/zod';
|
|
8
8
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
@@ -298,7 +298,7 @@ declare const FINBRICKS_ENDPOINTS: {
|
|
|
298
298
|
readonly ACCOUNT_LIST: "/account/list";
|
|
299
299
|
readonly ACCOUNT_BALANCE: "/account/balance";
|
|
300
300
|
readonly ACCOUNT_TRANSACTIONS: "/account/transactions";
|
|
301
|
-
readonly TRANSACTION_INIT: "/transaction/platform/init";
|
|
301
|
+
readonly TRANSACTION_INIT: "/transaction/platform/domestic/init";
|
|
302
302
|
readonly TRANSACTION_STATUS: "/transaction/platform/status";
|
|
303
303
|
readonly TRANSACTION_SEPA_INIT: "/transaction/platform/sepa/init";
|
|
304
304
|
readonly TRANSACTION_FOREIGN_INIT: "/transaction/platform/foreign/init";
|
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.DOriJdJs.mjs';
|
|
2
2
|
export { A as ACCOUNT_STATUSES, B as BATCH_MODES, a as BATCH_STATUES, a as BATCH_STATUSES, C as CHARGE_BEARERS, b as CONNECTOR_KEYS, c as COUNTRY_CODES, d as CREDENTIALS_TYPES, I as INSTRUCTION_PRIORITIES, P as PAYMENT_DIRECTIONS, e as PAYMENT_REQUEST_STATUSES, f as PAYMENT_STATUSES, g as PAYMENT_TYPES, T as TOKEN_TYPES } from './shared/bank.BT7HayCV.mjs';
|
|
3
3
|
export { i as isBatchAuthorized, a as isBatchCompleted, b as isBatchFailed, c as isBatchInitiated, d as isBatchProcessing, e as isBatchReadyToSign } from './shared/bank.XqSw509X.mjs';
|
|
4
4
|
export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|