@develit-services/bank 5.3.1 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.cjs +2 -2
- package/dist/base.d.cts +14 -14
- package/dist/base.d.mts +14 -14
- package/dist/base.d.ts +14 -14
- package/dist/base.mjs +2 -2
- 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.CdkOsZE8.d.cts → bank.BxI2mvWk.d.cts} +3 -3
- package/dist/shared/{bank.CdkOsZE8.d.mts → bank.BxI2mvWk.d.mts} +3 -3
- package/dist/shared/{bank.CdkOsZE8.d.ts → bank.BxI2mvWk.d.ts} +3 -3
- package/dist/shared/{bank.DhMbV8-X.mjs → bank.Bzl0ao-B.mjs} +92 -38
- package/dist/shared/{bank.D__RVhfE.d.cts → bank.C3e_tQ9U.d.mts} +1 -1
- package/dist/shared/{bank.IAc8kIC-.d.ts → bank.CjTUoXAs.d.ts} +1 -1
- package/dist/shared/{bank.BuwSQL_7.d.mts → bank.DBt9tdX9.d.cts} +1 -1
- package/dist/shared/{bank.CV8QTlfT.cjs → bank.DRlIUffV.cjs} +92 -38
- package/dist/shared/{bank.CBmzxkLV.mjs → bank.Dl0FfB4s.mjs} +1 -1
- package/dist/shared/{bank.BeyJhLoh.cjs → bank.UnkEmrVs.cjs} +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.d.cts +10 -4
- package/dist/types.d.mts +10 -4
- package/dist/types.d.ts +10 -4
- package/dist/types.mjs +1 -1
- package/package.json +1 -1
package/dist/base.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
|
-
const bank = require('./shared/bank.
|
|
4
|
+
const bank = require('./shared/bank.DRlIUffV.cjs');
|
|
5
5
|
const drizzleOrm = require('drizzle-orm');
|
|
6
6
|
const cloudflare_workers = require('cloudflare:workers');
|
|
7
7
|
const d1 = require('drizzle-orm/d1');
|
|
@@ -11,7 +11,7 @@ const database_schema = require('./shared/bank.9Yw4KHyl.cjs');
|
|
|
11
11
|
const generalCodes = require('@develit-io/general-codes');
|
|
12
12
|
require('date-fns');
|
|
13
13
|
require('node:crypto');
|
|
14
|
-
const credentialsResolver = require('./shared/bank.
|
|
14
|
+
const credentialsResolver = require('./shared/bank.UnkEmrVs.cjs');
|
|
15
15
|
require('drizzle-orm/zod');
|
|
16
16
|
require('drizzle-orm/sqlite-core');
|
|
17
17
|
|
package/dist/base.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.
|
|
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 ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.BxI2mvWk.cjs';
|
|
2
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.DBt9tdX9.cjs';
|
|
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';
|
|
@@ -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>;
|
|
@@ -2956,20 +2956,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2956
2956
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2957
2957
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2958
2958
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2959
|
-
BOOKED: "BOOKED";
|
|
2960
|
-
REJECTED: "REJECTED";
|
|
2961
|
-
PENDING: "PENDING";
|
|
2962
2959
|
PROCESSING: "PROCESSING";
|
|
2960
|
+
PENDING: "PENDING";
|
|
2961
|
+
BOOKED: "BOOKED";
|
|
2963
2962
|
CANCELLED: "CANCELLED";
|
|
2963
|
+
REJECTED: "REJECTED";
|
|
2964
2964
|
SCHEDULED: "SCHEDULED";
|
|
2965
2965
|
HOLD: "HOLD";
|
|
2966
2966
|
INFO: "INFO";
|
|
2967
2967
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2968
|
-
BOOKED: "BOOKED";
|
|
2969
|
-
REJECTED: "REJECTED";
|
|
2970
|
-
PENDING: "PENDING";
|
|
2971
2968
|
PROCESSING: "PROCESSING";
|
|
2969
|
+
PENDING: "PENDING";
|
|
2970
|
+
BOOKED: "BOOKED";
|
|
2972
2971
|
CANCELLED: "CANCELLED";
|
|
2972
|
+
REJECTED: "REJECTED";
|
|
2973
2973
|
SCHEDULED: "SCHEDULED";
|
|
2974
2974
|
HOLD: "HOLD";
|
|
2975
2975
|
INFO: "INFO";
|
|
@@ -3886,20 +3886,20 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3886
3886
|
}, z.core.$strip>;
|
|
3887
3887
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3888
3888
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3889
|
-
OPENED: "OPENED";
|
|
3890
3889
|
AUTHORIZED: "AUTHORIZED";
|
|
3891
3890
|
COMPLETED: "COMPLETED";
|
|
3892
3891
|
BOOKED: "BOOKED";
|
|
3893
|
-
SETTLED: "SETTLED";
|
|
3894
3892
|
REJECTED: "REJECTED";
|
|
3893
|
+
OPENED: "OPENED";
|
|
3894
|
+
SETTLED: "SETTLED";
|
|
3895
3895
|
CLOSED: "CLOSED";
|
|
3896
3896
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3897
|
-
OPENED: "OPENED";
|
|
3898
3897
|
AUTHORIZED: "AUTHORIZED";
|
|
3899
3898
|
COMPLETED: "COMPLETED";
|
|
3900
3899
|
BOOKED: "BOOKED";
|
|
3901
|
-
SETTLED: "SETTLED";
|
|
3902
3900
|
REJECTED: "REJECTED";
|
|
3901
|
+
OPENED: "OPENED";
|
|
3902
|
+
SETTLED: "SETTLED";
|
|
3903
3903
|
CLOSED: "CLOSED";
|
|
3904
3904
|
}>>]>>;
|
|
3905
3905
|
filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
package/dist/base.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.
|
|
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 ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.BxI2mvWk.mjs';
|
|
2
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.C3e_tQ9U.mjs';
|
|
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';
|
|
@@ -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>;
|
|
@@ -2956,20 +2956,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2956
2956
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2957
2957
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2958
2958
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2959
|
-
BOOKED: "BOOKED";
|
|
2960
|
-
REJECTED: "REJECTED";
|
|
2961
|
-
PENDING: "PENDING";
|
|
2962
2959
|
PROCESSING: "PROCESSING";
|
|
2960
|
+
PENDING: "PENDING";
|
|
2961
|
+
BOOKED: "BOOKED";
|
|
2963
2962
|
CANCELLED: "CANCELLED";
|
|
2963
|
+
REJECTED: "REJECTED";
|
|
2964
2964
|
SCHEDULED: "SCHEDULED";
|
|
2965
2965
|
HOLD: "HOLD";
|
|
2966
2966
|
INFO: "INFO";
|
|
2967
2967
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2968
|
-
BOOKED: "BOOKED";
|
|
2969
|
-
REJECTED: "REJECTED";
|
|
2970
|
-
PENDING: "PENDING";
|
|
2971
2968
|
PROCESSING: "PROCESSING";
|
|
2969
|
+
PENDING: "PENDING";
|
|
2970
|
+
BOOKED: "BOOKED";
|
|
2972
2971
|
CANCELLED: "CANCELLED";
|
|
2972
|
+
REJECTED: "REJECTED";
|
|
2973
2973
|
SCHEDULED: "SCHEDULED";
|
|
2974
2974
|
HOLD: "HOLD";
|
|
2975
2975
|
INFO: "INFO";
|
|
@@ -3886,20 +3886,20 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3886
3886
|
}, z.core.$strip>;
|
|
3887
3887
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3888
3888
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3889
|
-
OPENED: "OPENED";
|
|
3890
3889
|
AUTHORIZED: "AUTHORIZED";
|
|
3891
3890
|
COMPLETED: "COMPLETED";
|
|
3892
3891
|
BOOKED: "BOOKED";
|
|
3893
|
-
SETTLED: "SETTLED";
|
|
3894
3892
|
REJECTED: "REJECTED";
|
|
3893
|
+
OPENED: "OPENED";
|
|
3894
|
+
SETTLED: "SETTLED";
|
|
3895
3895
|
CLOSED: "CLOSED";
|
|
3896
3896
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3897
|
-
OPENED: "OPENED";
|
|
3898
3897
|
AUTHORIZED: "AUTHORIZED";
|
|
3899
3898
|
COMPLETED: "COMPLETED";
|
|
3900
3899
|
BOOKED: "BOOKED";
|
|
3901
|
-
SETTLED: "SETTLED";
|
|
3902
3900
|
REJECTED: "REJECTED";
|
|
3901
|
+
OPENED: "OPENED";
|
|
3902
|
+
SETTLED: "SETTLED";
|
|
3903
3903
|
CLOSED: "CLOSED";
|
|
3904
3904
|
}>>]>>;
|
|
3905
3905
|
filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
package/dist/base.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.
|
|
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 ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.BxI2mvWk.js';
|
|
2
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.CjTUoXAs.js';
|
|
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';
|
|
@@ -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>;
|
|
@@ -2956,20 +2956,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2956
2956
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2957
2957
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2958
2958
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2959
|
-
BOOKED: "BOOKED";
|
|
2960
|
-
REJECTED: "REJECTED";
|
|
2961
|
-
PENDING: "PENDING";
|
|
2962
2959
|
PROCESSING: "PROCESSING";
|
|
2960
|
+
PENDING: "PENDING";
|
|
2961
|
+
BOOKED: "BOOKED";
|
|
2963
2962
|
CANCELLED: "CANCELLED";
|
|
2963
|
+
REJECTED: "REJECTED";
|
|
2964
2964
|
SCHEDULED: "SCHEDULED";
|
|
2965
2965
|
HOLD: "HOLD";
|
|
2966
2966
|
INFO: "INFO";
|
|
2967
2967
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2968
|
-
BOOKED: "BOOKED";
|
|
2969
|
-
REJECTED: "REJECTED";
|
|
2970
|
-
PENDING: "PENDING";
|
|
2971
2968
|
PROCESSING: "PROCESSING";
|
|
2969
|
+
PENDING: "PENDING";
|
|
2970
|
+
BOOKED: "BOOKED";
|
|
2972
2971
|
CANCELLED: "CANCELLED";
|
|
2972
|
+
REJECTED: "REJECTED";
|
|
2973
2973
|
SCHEDULED: "SCHEDULED";
|
|
2974
2974
|
HOLD: "HOLD";
|
|
2975
2975
|
INFO: "INFO";
|
|
@@ -3886,20 +3886,20 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3886
3886
|
}, z.core.$strip>;
|
|
3887
3887
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3888
3888
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3889
|
-
OPENED: "OPENED";
|
|
3890
3889
|
AUTHORIZED: "AUTHORIZED";
|
|
3891
3890
|
COMPLETED: "COMPLETED";
|
|
3892
3891
|
BOOKED: "BOOKED";
|
|
3893
|
-
SETTLED: "SETTLED";
|
|
3894
3892
|
REJECTED: "REJECTED";
|
|
3893
|
+
OPENED: "OPENED";
|
|
3894
|
+
SETTLED: "SETTLED";
|
|
3895
3895
|
CLOSED: "CLOSED";
|
|
3896
3896
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3897
|
-
OPENED: "OPENED";
|
|
3898
3897
|
AUTHORIZED: "AUTHORIZED";
|
|
3899
3898
|
COMPLETED: "COMPLETED";
|
|
3900
3899
|
BOOKED: "BOOKED";
|
|
3901
|
-
SETTLED: "SETTLED";
|
|
3902
3900
|
REJECTED: "REJECTED";
|
|
3901
|
+
OPENED: "OPENED";
|
|
3902
|
+
SETTLED: "SETTLED";
|
|
3903
3903
|
CLOSED: "CLOSED";
|
|
3904
3904
|
}>>]>>;
|
|
3905
3905
|
filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
package/dist/base.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { uuidv4, first, buildMultiFilterConditions as buildMultiFilterConditions$1, bankAccountMetadataSchema, structuredAddressSchema, workflowInstanceStatusSchema, develitWorker, createInternalError, action, service } from '@develit-io/backend-sdk';
|
|
2
|
-
import { G as tables, g as accountInsertSchema, H as relations, J as initiateConnector, o as isProcessedStatus, p as isTerminalStatus, L as getNonTerminalPaymentRequestsQuery, x as toIncomingPayment, N as calculateCzechIban, j as assignAccount, u as toBatchedPayment, y as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from './shared/bank.
|
|
2
|
+
import { G as tables, g as accountInsertSchema, H as relations, J as initiateConnector, o as isProcessedStatus, p as isTerminalStatus, L as getNonTerminalPaymentRequestsQuery, x as toIncomingPayment, N as calculateCzechIban, j as assignAccount, u as toBatchedPayment, y as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from './shared/bank.Bzl0ao-B.mjs';
|
|
3
3
|
import { eq, sql, and, like, asc, desc, inArray, gte, lte, isNull, count } from 'drizzle-orm';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { drizzle } from 'drizzle-orm/d1';
|
|
@@ -9,7 +9,7 @@ import { I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, g as PAYMENT_TYPES, b
|
|
|
9
9
|
import { CURRENCY_CODES } from '@develit-io/general-codes';
|
|
10
10
|
import 'date-fns';
|
|
11
11
|
import 'node:crypto';
|
|
12
|
-
import { h as encrypt, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, i as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from './shared/bank.
|
|
12
|
+
import { h as encrypt, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, i as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from './shared/bank.Dl0FfB4s.mjs';
|
|
13
13
|
import 'drizzle-orm/zod';
|
|
14
14
|
import 'drizzle-orm/sqlite-core';
|
|
15
15
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.
|
|
1
|
+
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.BxI2mvWk.cjs';
|
|
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.BxI2mvWk.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.BxI2mvWk.js';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import '@develit-io/general-codes';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
|
-
const bank = require('../shared/bank.
|
|
4
|
+
const bank = require('../shared/bank.DRlIUffV.cjs');
|
|
5
5
|
const batchLifecycle = require('../shared/bank.NF8bZBy0.cjs');
|
|
6
6
|
const drizzleOrm = require('drizzle-orm');
|
|
7
|
-
const credentialsResolver = require('../shared/bank.
|
|
7
|
+
const credentialsResolver = require('../shared/bank.UnkEmrVs.cjs');
|
|
8
8
|
const cloudflare_workers = require('cloudflare:workers');
|
|
9
9
|
const cloudflare_workflows = require('cloudflare:workflows');
|
|
10
10
|
const d1 = require('drizzle-orm/d1');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { first, uuidv4, asNonEmpty } from '@develit-io/backend-sdk';
|
|
2
|
-
import { G as tables, H as relations, v as toBatchedPaymentFromPaymentRequest, z as toPreparedPayment, J as initiateConnector, m as isPaymentCompleted } from '../shared/bank.
|
|
2
|
+
import { G as tables, H as relations, v as toBatchedPaymentFromPaymentRequest, z as toPreparedPayment, J as initiateConnector, m as isPaymentCompleted } from '../shared/bank.Bzl0ao-B.mjs';
|
|
3
3
|
import { i as isBatchAuthorized, b as isBatchFailed, d as isBatchProcessing } from '../shared/bank.XqSw509X.mjs';
|
|
4
4
|
import { eq, and, inArray } from 'drizzle-orm';
|
|
5
|
-
import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.
|
|
5
|
+
import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.Dl0FfB4s.mjs';
|
|
6
6
|
import { WorkflowEntrypoint } from 'cloudflare:workers';
|
|
7
7
|
import { NonRetryableError } from 'cloudflare:workflows';
|
|
8
8
|
import { drizzle } from 'drizzle-orm/d1';
|
|
@@ -3230,7 +3230,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3230
3230
|
name: string;
|
|
3231
3231
|
tableName: "batch";
|
|
3232
3232
|
dataType: "string enum";
|
|
3233
|
-
data: "AUTHORIZED" | "
|
|
3233
|
+
data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
|
|
3234
3234
|
driverParam: string;
|
|
3235
3235
|
notNull: false;
|
|
3236
3236
|
hasDefault: false;
|
|
@@ -3606,7 +3606,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3606
3606
|
name: string;
|
|
3607
3607
|
tableName: "payment";
|
|
3608
3608
|
dataType: "string enum";
|
|
3609
|
-
data: "
|
|
3609
|
+
data: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3610
3610
|
driverParam: string;
|
|
3611
3611
|
notNull: true;
|
|
3612
3612
|
hasDefault: false;
|
|
@@ -4110,7 +4110,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4110
4110
|
name: string;
|
|
4111
4111
|
tableName: "payment_request";
|
|
4112
4112
|
dataType: "string enum";
|
|
4113
|
-
data: "
|
|
4113
|
+
data: "AUTHORIZED" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
|
|
4114
4114
|
driverParam: string;
|
|
4115
4115
|
notNull: true;
|
|
4116
4116
|
hasDefault: false;
|
|
@@ -3230,7 +3230,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3230
3230
|
name: string;
|
|
3231
3231
|
tableName: "batch";
|
|
3232
3232
|
dataType: "string enum";
|
|
3233
|
-
data: "AUTHORIZED" | "
|
|
3233
|
+
data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
|
|
3234
3234
|
driverParam: string;
|
|
3235
3235
|
notNull: false;
|
|
3236
3236
|
hasDefault: false;
|
|
@@ -3606,7 +3606,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3606
3606
|
name: string;
|
|
3607
3607
|
tableName: "payment";
|
|
3608
3608
|
dataType: "string enum";
|
|
3609
|
-
data: "
|
|
3609
|
+
data: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3610
3610
|
driverParam: string;
|
|
3611
3611
|
notNull: true;
|
|
3612
3612
|
hasDefault: false;
|
|
@@ -4110,7 +4110,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4110
4110
|
name: string;
|
|
4111
4111
|
tableName: "payment_request";
|
|
4112
4112
|
dataType: "string enum";
|
|
4113
|
-
data: "
|
|
4113
|
+
data: "AUTHORIZED" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
|
|
4114
4114
|
driverParam: string;
|
|
4115
4115
|
notNull: true;
|
|
4116
4116
|
hasDefault: false;
|
|
@@ -3230,7 +3230,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3230
3230
|
name: string;
|
|
3231
3231
|
tableName: "batch";
|
|
3232
3232
|
dataType: "string enum";
|
|
3233
|
-
data: "AUTHORIZED" | "
|
|
3233
|
+
data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
|
|
3234
3234
|
driverParam: string;
|
|
3235
3235
|
notNull: false;
|
|
3236
3236
|
hasDefault: false;
|
|
@@ -3606,7 +3606,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3606
3606
|
name: string;
|
|
3607
3607
|
tableName: "payment";
|
|
3608
3608
|
dataType: "string enum";
|
|
3609
|
-
data: "
|
|
3609
|
+
data: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3610
3610
|
driverParam: string;
|
|
3611
3611
|
notNull: true;
|
|
3612
3612
|
hasDefault: false;
|
|
@@ -4110,7 +4110,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4110
4110
|
name: string;
|
|
4111
4111
|
tableName: "payment_request";
|
|
4112
4112
|
dataType: "string enum";
|
|
4113
|
-
data: "
|
|
4113
|
+
data: "AUTHORIZED" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
|
|
4114
4114
|
driverParam: string;
|
|
4115
4115
|
notNull: true;
|
|
4116
4116
|
hasDefault: false;
|
|
@@ -29,6 +29,49 @@ const relations = defineRelations(schema, (r) => ({
|
|
|
29
29
|
|
|
30
30
|
const tables = schema;
|
|
31
31
|
|
|
32
|
+
class FinbricksApiError extends Error {
|
|
33
|
+
constructor(args) {
|
|
34
|
+
const detail = typeof args.body === "string" ? args.body : JSON.stringify(args.body);
|
|
35
|
+
super(
|
|
36
|
+
`Finbricks API error: ${args.httpStatus} ${args.httpStatusText} \u2013 ${detail}`
|
|
37
|
+
);
|
|
38
|
+
this.name = "FinbricksApiError";
|
|
39
|
+
this.httpStatus = args.httpStatus;
|
|
40
|
+
this.httpStatusText = args.httpStatusText;
|
|
41
|
+
this.code = args.code;
|
|
42
|
+
this.finbricksMessage = args.finbricksMessage;
|
|
43
|
+
this.xrequestId = args.xrequestId;
|
|
44
|
+
this.body = args.body;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function isFinbricksApiError(error) {
|
|
48
|
+
return error instanceof FinbricksApiError;
|
|
49
|
+
}
|
|
50
|
+
function buildFinbricksApiError(args) {
|
|
51
|
+
const env = typeof args.body === "object" && args.body !== null ? args.body : {};
|
|
52
|
+
return new FinbricksApiError({
|
|
53
|
+
httpStatus: args.httpStatus,
|
|
54
|
+
httpStatusText: args.httpStatusText,
|
|
55
|
+
code: typeof env.code === "number" ? env.code : void 0,
|
|
56
|
+
finbricksMessage: typeof env.message === "string" ? env.message : void 0,
|
|
57
|
+
xrequestId: typeof env.xrequestId === "string" ? env.xrequestId : void 0,
|
|
58
|
+
body: args.body
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function describeFinbricksFailure(operation, error) {
|
|
62
|
+
const base = `Finbricks: failed to ${operation}`;
|
|
63
|
+
if (!isFinbricksApiError(error)) return { message: base };
|
|
64
|
+
const parts = [
|
|
65
|
+
error.finbricksMessage,
|
|
66
|
+
error.code != null ? `code ${error.code}` : void 0,
|
|
67
|
+
error.xrequestId ? `xrequestId ${error.xrequestId}` : void 0
|
|
68
|
+
].filter(Boolean);
|
|
69
|
+
return {
|
|
70
|
+
...error.code != null && { code: `FINBRICKS_${error.code}` },
|
|
71
|
+
message: parts.length ? `${base} \u2013 ${parts.join(", ")}` : base
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
32
75
|
async function signFinbricksJws({
|
|
33
76
|
privateKeyPem,
|
|
34
77
|
merchantId,
|
|
@@ -129,10 +172,11 @@ const useFinbricksFetch = async (config, init) => {
|
|
|
129
172
|
url: url.toString(),
|
|
130
173
|
body: redactedBody
|
|
131
174
|
});
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
175
|
+
throw buildFinbricksApiError({
|
|
176
|
+
httpStatus: res.status,
|
|
177
|
+
httpStatusText: res.statusText,
|
|
178
|
+
body: redactedBody
|
|
179
|
+
});
|
|
136
180
|
}
|
|
137
181
|
const json = await res.json();
|
|
138
182
|
console.log(
|
|
@@ -799,9 +843,10 @@ class FinbricksConnector extends IBankConnector {
|
|
|
799
843
|
})
|
|
800
844
|
);
|
|
801
845
|
if (error || !response) {
|
|
802
|
-
throw createInternalError(
|
|
803
|
-
|
|
804
|
-
|
|
846
|
+
throw createInternalError(
|
|
847
|
+
error,
|
|
848
|
+
describeFinbricksFailure("connect user", error)
|
|
849
|
+
);
|
|
805
850
|
}
|
|
806
851
|
return response.redirectUrl;
|
|
807
852
|
}
|
|
@@ -867,9 +912,13 @@ class FinbricksConnector extends IBankConnector {
|
|
|
867
912
|
})
|
|
868
913
|
);
|
|
869
914
|
if (error) {
|
|
870
|
-
throw createInternalError(
|
|
871
|
-
|
|
872
|
-
|
|
915
|
+
throw createInternalError(
|
|
916
|
+
error,
|
|
917
|
+
describeFinbricksFailure(
|
|
918
|
+
`revoke authentication for clientId ${clientId}`,
|
|
919
|
+
error
|
|
920
|
+
)
|
|
921
|
+
);
|
|
873
922
|
}
|
|
874
923
|
}
|
|
875
924
|
async isClientIdExpired({
|
|
@@ -887,9 +936,13 @@ class FinbricksConnector extends IBankConnector {
|
|
|
887
936
|
})
|
|
888
937
|
);
|
|
889
938
|
if (error) {
|
|
890
|
-
throw createInternalError(
|
|
891
|
-
|
|
892
|
-
|
|
939
|
+
throw createInternalError(
|
|
940
|
+
error,
|
|
941
|
+
describeFinbricksFailure(
|
|
942
|
+
`fetch token info for clientId: ${clientId}`,
|
|
943
|
+
error
|
|
944
|
+
)
|
|
945
|
+
);
|
|
893
946
|
}
|
|
894
947
|
if (!response || response.length === 0) return true;
|
|
895
948
|
const record = response.find((token) => token.clientId === clientId);
|
|
@@ -912,11 +965,10 @@ class FinbricksConnector extends IBankConnector {
|
|
|
912
965
|
})
|
|
913
966
|
);
|
|
914
967
|
if (error || !response) {
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
});
|
|
968
|
+
throw createInternalError(
|
|
969
|
+
error,
|
|
970
|
+
describeFinbricksFailure("list accounts", error)
|
|
971
|
+
);
|
|
920
972
|
}
|
|
921
973
|
return response.accounts;
|
|
922
974
|
}
|
|
@@ -988,6 +1040,7 @@ class FinbricksConnector extends IBankConnector {
|
|
|
988
1040
|
);
|
|
989
1041
|
const clientId = await this.getClientId(debtorAccount.id);
|
|
990
1042
|
const creditorAddress = mapToFinbricksAddress(payment.creditor.address);
|
|
1043
|
+
const debtorAddress = mapToFinbricksAddress(payment.debtor.address);
|
|
991
1044
|
const debtorIdentification = resolveAccountIdentification(payment.debtor);
|
|
992
1045
|
const creditorIdentification = resolveAccountIdentification(
|
|
993
1046
|
payment.creditor,
|
|
@@ -1027,7 +1080,8 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1027
1080
|
debtor: {
|
|
1028
1081
|
accountIdentification: debtorIdentification,
|
|
1029
1082
|
debtorName: payment.debtor.holderName,
|
|
1030
|
-
paymentProvider: this.PROVIDER
|
|
1083
|
+
paymentProvider: this.PROVIDER,
|
|
1084
|
+
...debtorAddress && { postalAddress: debtorAddress }
|
|
1031
1085
|
},
|
|
1032
1086
|
creditor: {
|
|
1033
1087
|
accountIdentification: creditorIdentification,
|
|
@@ -1041,11 +1095,10 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1041
1095
|
})
|
|
1042
1096
|
);
|
|
1043
1097
|
if (error || !response) {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
});
|
|
1098
|
+
throw createInternalError(
|
|
1099
|
+
error,
|
|
1100
|
+
describeFinbricksFailure("initiate FOREIGN payment", error)
|
|
1101
|
+
);
|
|
1049
1102
|
}
|
|
1050
1103
|
return {
|
|
1051
1104
|
authorizationUrl: response.redirectUrl,
|
|
@@ -1067,6 +1120,7 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1067
1120
|
);
|
|
1068
1121
|
const clientId = await this.getClientId(debtorAccount.id);
|
|
1069
1122
|
const creditorAddress = mapToFinbricksAddress(payment.creditor.address);
|
|
1123
|
+
const debtorAddress = mapToFinbricksAddress(payment.debtor.address);
|
|
1070
1124
|
const message = payment.message?.trim() ?? "";
|
|
1071
1125
|
const reference = buildPaymentReference({
|
|
1072
1126
|
vs: payment.vs,
|
|
@@ -1095,7 +1149,8 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1095
1149
|
debtor: {
|
|
1096
1150
|
debtorAccountIban: payment.debtor.iban,
|
|
1097
1151
|
debtorName: payment.debtor.holderName,
|
|
1098
|
-
paymentProvider: this.PROVIDER
|
|
1152
|
+
paymentProvider: this.PROVIDER,
|
|
1153
|
+
...debtorAddress && { postalAddress: debtorAddress }
|
|
1099
1154
|
},
|
|
1100
1155
|
creditor: {
|
|
1101
1156
|
creditorAccountIban: payment.creditor.iban,
|
|
@@ -1108,11 +1163,10 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1108
1163
|
})
|
|
1109
1164
|
);
|
|
1110
1165
|
if (error || !response) {
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
});
|
|
1166
|
+
throw createInternalError(
|
|
1167
|
+
error,
|
|
1168
|
+
describeFinbricksFailure("initiate SEPA payment", error)
|
|
1169
|
+
);
|
|
1116
1170
|
}
|
|
1117
1171
|
return {
|
|
1118
1172
|
authorizationUrl: response.redirectUrl,
|
|
@@ -1152,11 +1206,10 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1152
1206
|
})
|
|
1153
1207
|
);
|
|
1154
1208
|
if (error || !response) {
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
});
|
|
1209
|
+
throw createInternalError(
|
|
1210
|
+
error,
|
|
1211
|
+
describeFinbricksFailure("initiate payment", error)
|
|
1212
|
+
);
|
|
1160
1213
|
}
|
|
1161
1214
|
return {
|
|
1162
1215
|
authorizationUrl: response.redirectUrl,
|
|
@@ -1232,9 +1285,10 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1232
1285
|
})
|
|
1233
1286
|
);
|
|
1234
1287
|
if (error || !response) {
|
|
1235
|
-
throw createInternalError(
|
|
1236
|
-
|
|
1237
|
-
|
|
1288
|
+
throw createInternalError(
|
|
1289
|
+
error,
|
|
1290
|
+
describeFinbricksFailure("fetch payment status", error)
|
|
1291
|
+
);
|
|
1238
1292
|
}
|
|
1239
1293
|
return mapFinbricksTransactionStatus(response.resultCode);
|
|
1240
1294
|
}
|
|
@@ -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.BxI2mvWk.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.BxI2mvWk.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.
|
|
1
|
+
import { e as CurrencyCode, R as BankCode, a1 as CountryCode, P as PaymentRequestSelectType } from './bank.BxI2mvWk.cjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
|
|
@@ -31,6 +31,49 @@ const relations = drizzleOrm.defineRelations(database_schema.schema, (r) => ({
|
|
|
31
31
|
|
|
32
32
|
const tables = database_schema.schema;
|
|
33
33
|
|
|
34
|
+
class FinbricksApiError extends Error {
|
|
35
|
+
constructor(args) {
|
|
36
|
+
const detail = typeof args.body === "string" ? args.body : JSON.stringify(args.body);
|
|
37
|
+
super(
|
|
38
|
+
`Finbricks API error: ${args.httpStatus} ${args.httpStatusText} \u2013 ${detail}`
|
|
39
|
+
);
|
|
40
|
+
this.name = "FinbricksApiError";
|
|
41
|
+
this.httpStatus = args.httpStatus;
|
|
42
|
+
this.httpStatusText = args.httpStatusText;
|
|
43
|
+
this.code = args.code;
|
|
44
|
+
this.finbricksMessage = args.finbricksMessage;
|
|
45
|
+
this.xrequestId = args.xrequestId;
|
|
46
|
+
this.body = args.body;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function isFinbricksApiError(error) {
|
|
50
|
+
return error instanceof FinbricksApiError;
|
|
51
|
+
}
|
|
52
|
+
function buildFinbricksApiError(args) {
|
|
53
|
+
const env = typeof args.body === "object" && args.body !== null ? args.body : {};
|
|
54
|
+
return new FinbricksApiError({
|
|
55
|
+
httpStatus: args.httpStatus,
|
|
56
|
+
httpStatusText: args.httpStatusText,
|
|
57
|
+
code: typeof env.code === "number" ? env.code : void 0,
|
|
58
|
+
finbricksMessage: typeof env.message === "string" ? env.message : void 0,
|
|
59
|
+
xrequestId: typeof env.xrequestId === "string" ? env.xrequestId : void 0,
|
|
60
|
+
body: args.body
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function describeFinbricksFailure(operation, error) {
|
|
64
|
+
const base = `Finbricks: failed to ${operation}`;
|
|
65
|
+
if (!isFinbricksApiError(error)) return { message: base };
|
|
66
|
+
const parts = [
|
|
67
|
+
error.finbricksMessage,
|
|
68
|
+
error.code != null ? `code ${error.code}` : void 0,
|
|
69
|
+
error.xrequestId ? `xrequestId ${error.xrequestId}` : void 0
|
|
70
|
+
].filter(Boolean);
|
|
71
|
+
return {
|
|
72
|
+
...error.code != null && { code: `FINBRICKS_${error.code}` },
|
|
73
|
+
message: parts.length ? `${base} \u2013 ${parts.join(", ")}` : base
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
34
77
|
async function signFinbricksJws({
|
|
35
78
|
privateKeyPem,
|
|
36
79
|
merchantId,
|
|
@@ -131,10 +174,11 @@ const useFinbricksFetch = async (config, init) => {
|
|
|
131
174
|
url: url.toString(),
|
|
132
175
|
body: redactedBody
|
|
133
176
|
});
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
177
|
+
throw buildFinbricksApiError({
|
|
178
|
+
httpStatus: res.status,
|
|
179
|
+
httpStatusText: res.statusText,
|
|
180
|
+
body: redactedBody
|
|
181
|
+
});
|
|
138
182
|
}
|
|
139
183
|
const json = await res.json();
|
|
140
184
|
console.log(
|
|
@@ -801,9 +845,10 @@ class FinbricksConnector extends IBankConnector {
|
|
|
801
845
|
})
|
|
802
846
|
);
|
|
803
847
|
if (error || !response) {
|
|
804
|
-
throw backendSdk.createInternalError(
|
|
805
|
-
|
|
806
|
-
|
|
848
|
+
throw backendSdk.createInternalError(
|
|
849
|
+
error,
|
|
850
|
+
describeFinbricksFailure("connect user", error)
|
|
851
|
+
);
|
|
807
852
|
}
|
|
808
853
|
return response.redirectUrl;
|
|
809
854
|
}
|
|
@@ -869,9 +914,13 @@ class FinbricksConnector extends IBankConnector {
|
|
|
869
914
|
})
|
|
870
915
|
);
|
|
871
916
|
if (error) {
|
|
872
|
-
throw backendSdk.createInternalError(
|
|
873
|
-
|
|
874
|
-
|
|
917
|
+
throw backendSdk.createInternalError(
|
|
918
|
+
error,
|
|
919
|
+
describeFinbricksFailure(
|
|
920
|
+
`revoke authentication for clientId ${clientId}`,
|
|
921
|
+
error
|
|
922
|
+
)
|
|
923
|
+
);
|
|
875
924
|
}
|
|
876
925
|
}
|
|
877
926
|
async isClientIdExpired({
|
|
@@ -889,9 +938,13 @@ class FinbricksConnector extends IBankConnector {
|
|
|
889
938
|
})
|
|
890
939
|
);
|
|
891
940
|
if (error) {
|
|
892
|
-
throw backendSdk.createInternalError(
|
|
893
|
-
|
|
894
|
-
|
|
941
|
+
throw backendSdk.createInternalError(
|
|
942
|
+
error,
|
|
943
|
+
describeFinbricksFailure(
|
|
944
|
+
`fetch token info for clientId: ${clientId}`,
|
|
945
|
+
error
|
|
946
|
+
)
|
|
947
|
+
);
|
|
895
948
|
}
|
|
896
949
|
if (!response || response.length === 0) return true;
|
|
897
950
|
const record = response.find((token) => token.clientId === clientId);
|
|
@@ -914,11 +967,10 @@ class FinbricksConnector extends IBankConnector {
|
|
|
914
967
|
})
|
|
915
968
|
);
|
|
916
969
|
if (error || !response) {
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
});
|
|
970
|
+
throw backendSdk.createInternalError(
|
|
971
|
+
error,
|
|
972
|
+
describeFinbricksFailure("list accounts", error)
|
|
973
|
+
);
|
|
922
974
|
}
|
|
923
975
|
return response.accounts;
|
|
924
976
|
}
|
|
@@ -990,6 +1042,7 @@ class FinbricksConnector extends IBankConnector {
|
|
|
990
1042
|
);
|
|
991
1043
|
const clientId = await this.getClientId(debtorAccount.id);
|
|
992
1044
|
const creditorAddress = mapToFinbricksAddress(payment.creditor.address);
|
|
1045
|
+
const debtorAddress = mapToFinbricksAddress(payment.debtor.address);
|
|
993
1046
|
const debtorIdentification = resolveAccountIdentification(payment.debtor);
|
|
994
1047
|
const creditorIdentification = resolveAccountIdentification(
|
|
995
1048
|
payment.creditor,
|
|
@@ -1029,7 +1082,8 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1029
1082
|
debtor: {
|
|
1030
1083
|
accountIdentification: debtorIdentification,
|
|
1031
1084
|
debtorName: payment.debtor.holderName,
|
|
1032
|
-
paymentProvider: this.PROVIDER
|
|
1085
|
+
paymentProvider: this.PROVIDER,
|
|
1086
|
+
...debtorAddress && { postalAddress: debtorAddress }
|
|
1033
1087
|
},
|
|
1034
1088
|
creditor: {
|
|
1035
1089
|
accountIdentification: creditorIdentification,
|
|
@@ -1043,11 +1097,10 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1043
1097
|
})
|
|
1044
1098
|
);
|
|
1045
1099
|
if (error || !response) {
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
});
|
|
1100
|
+
throw backendSdk.createInternalError(
|
|
1101
|
+
error,
|
|
1102
|
+
describeFinbricksFailure("initiate FOREIGN payment", error)
|
|
1103
|
+
);
|
|
1051
1104
|
}
|
|
1052
1105
|
return {
|
|
1053
1106
|
authorizationUrl: response.redirectUrl,
|
|
@@ -1069,6 +1122,7 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1069
1122
|
);
|
|
1070
1123
|
const clientId = await this.getClientId(debtorAccount.id);
|
|
1071
1124
|
const creditorAddress = mapToFinbricksAddress(payment.creditor.address);
|
|
1125
|
+
const debtorAddress = mapToFinbricksAddress(payment.debtor.address);
|
|
1072
1126
|
const message = payment.message?.trim() ?? "";
|
|
1073
1127
|
const reference = buildPaymentReference({
|
|
1074
1128
|
vs: payment.vs,
|
|
@@ -1097,7 +1151,8 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1097
1151
|
debtor: {
|
|
1098
1152
|
debtorAccountIban: payment.debtor.iban,
|
|
1099
1153
|
debtorName: payment.debtor.holderName,
|
|
1100
|
-
paymentProvider: this.PROVIDER
|
|
1154
|
+
paymentProvider: this.PROVIDER,
|
|
1155
|
+
...debtorAddress && { postalAddress: debtorAddress }
|
|
1101
1156
|
},
|
|
1102
1157
|
creditor: {
|
|
1103
1158
|
creditorAccountIban: payment.creditor.iban,
|
|
@@ -1110,11 +1165,10 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1110
1165
|
})
|
|
1111
1166
|
);
|
|
1112
1167
|
if (error || !response) {
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
});
|
|
1168
|
+
throw backendSdk.createInternalError(
|
|
1169
|
+
error,
|
|
1170
|
+
describeFinbricksFailure("initiate SEPA payment", error)
|
|
1171
|
+
);
|
|
1118
1172
|
}
|
|
1119
1173
|
return {
|
|
1120
1174
|
authorizationUrl: response.redirectUrl,
|
|
@@ -1154,11 +1208,10 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1154
1208
|
})
|
|
1155
1209
|
);
|
|
1156
1210
|
if (error || !response) {
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
});
|
|
1211
|
+
throw backendSdk.createInternalError(
|
|
1212
|
+
error,
|
|
1213
|
+
describeFinbricksFailure("initiate payment", error)
|
|
1214
|
+
);
|
|
1162
1215
|
}
|
|
1163
1216
|
return {
|
|
1164
1217
|
authorizationUrl: response.redirectUrl,
|
|
@@ -1234,9 +1287,10 @@ class FinbricksConnector extends IBankConnector {
|
|
|
1234
1287
|
})
|
|
1235
1288
|
);
|
|
1236
1289
|
if (error || !response) {
|
|
1237
|
-
throw backendSdk.createInternalError(
|
|
1238
|
-
|
|
1239
|
-
|
|
1290
|
+
throw backendSdk.createInternalError(
|
|
1291
|
+
error,
|
|
1292
|
+
describeFinbricksFailure("fetch payment status", error)
|
|
1293
|
+
);
|
|
1240
1294
|
}
|
|
1241
1295
|
return mapFinbricksTransactionStatus(response.resultCode);
|
|
1242
1296
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const drizzleOrm = require('drizzle-orm');
|
|
4
|
-
const bank = require('./bank.
|
|
4
|
+
const bank = require('./bank.DRlIUffV.cjs');
|
|
5
5
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
6
6
|
require('./bank.9Yw4KHyl.cjs');
|
|
7
7
|
require('date-fns');
|
package/dist/types.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const bank = require('./shared/bank.
|
|
3
|
+
const bank = require('./shared/bank.DRlIUffV.cjs');
|
|
4
4
|
const database_schema = require('./shared/bank.9Yw4KHyl.cjs');
|
|
5
5
|
const batchLifecycle = require('./shared/bank.NF8bZBy0.cjs');
|
|
6
6
|
const generalCodes = require('@develit-io/general-codes');
|
package/dist/types.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.
|
|
2
|
-
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.
|
|
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, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.BxI2mvWk.cjs';
|
|
2
|
+
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.BxI2mvWk.cjs';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.DBt9tdX9.cjs';
|
|
4
|
+
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.DBt9tdX9.cjs';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_orm_zod from 'drizzle-orm/zod';
|
|
@@ -135,6 +135,12 @@ type FinbricksForeignPaymentBody = {
|
|
|
135
135
|
psuId?: string;
|
|
136
136
|
segmentContextType?: 'RETAIL' | 'CORPORATE';
|
|
137
137
|
paymentProvider: string;
|
|
138
|
+
postalAddress?: {
|
|
139
|
+
streetName?: string;
|
|
140
|
+
buildingNumber?: string;
|
|
141
|
+
town?: string;
|
|
142
|
+
country?: string;
|
|
143
|
+
};
|
|
138
144
|
};
|
|
139
145
|
creditor: {
|
|
140
146
|
accountIdentification: {
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.
|
|
2
|
-
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.
|
|
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, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.BxI2mvWk.mjs';
|
|
2
|
+
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.BxI2mvWk.mjs';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.C3e_tQ9U.mjs';
|
|
4
|
+
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.C3e_tQ9U.mjs';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_orm_zod from 'drizzle-orm/zod';
|
|
@@ -135,6 +135,12 @@ type FinbricksForeignPaymentBody = {
|
|
|
135
135
|
psuId?: string;
|
|
136
136
|
segmentContextType?: 'RETAIL' | 'CORPORATE';
|
|
137
137
|
paymentProvider: string;
|
|
138
|
+
postalAddress?: {
|
|
139
|
+
streetName?: string;
|
|
140
|
+
buildingNumber?: string;
|
|
141
|
+
town?: string;
|
|
142
|
+
country?: string;
|
|
143
|
+
};
|
|
138
144
|
};
|
|
139
145
|
creditor: {
|
|
140
146
|
accountIdentification: {
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.
|
|
2
|
-
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.
|
|
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, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.BxI2mvWk.js';
|
|
2
|
+
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, E as AccountCredentialsUpdateType, F as AccountPatchType, G as AccountStatus, J as AccountUpdateType, K as AuthorizedBatch, M as BASE_TERMINAL_STATUSES, N as BATCH_MODES, O as BATCH_STATUES, O as BATCH_STATUSES, Q as BankAccountWithLastSync, R as BankCode, S as BatchInsertType, T as BatchLifecycle, U as BatchMode, V as BatchPayment, B as BatchSelectType, W as BatchStatus, X as CHARGE_BEARERS, Y as CONNECTOR_KEYS, Z as COUNTRY_CODES, _ as CREDENTIALS_TYPES, $ as ChargeBearer, a0 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a1 as CountryCode, a2 as CredentialsType, e as CurrencyCode, a3 as INSTRUCTION_PRIORITIES, a4 as InstructionPriority, L as LastSyncMetadata, a5 as PAYMENT_DIRECTIONS, a6 as PAYMENT_REQUEST_STATUSES, a7 as PAYMENT_STATUSES, a8 as PAYMENT_TYPES, a9 as PaymentDirection, aa as PaymentFailedInsertType, ab as PaymentInsertType, ac as PaymentLifecycle, ad as PaymentPreparedInsertType, ae as PaymentStatus, af as ProcessingBatch, ag as ReadyToSignBatch, ah as ResolvedCredentials, ai as TOKEN_TYPES, aj as TokenType, ak as accountCredentialsInsertSchema, al as accountCredentialsSelectSchema, am as accountCredentialsUpdateSchema, an as accountInsertSchema, ao as accountSelectSchema, ap as accountUpdateSchema, aq as hasPaymentAccountAssigned, ar as isBatchAuthorized, as as isBatchCompleted, at as isBatchFailed, au as isBatchInitiated, av as isBatchProcessing, aw as isBatchReadyToSign, ax as isPaymentCompleted, ay as isPendingStatus, az as isProcessedStatus, aA as isTerminalStatus } from './shared/bank.BxI2mvWk.js';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.CjTUoXAs.js';
|
|
4
|
+
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.CjTUoXAs.js';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_orm_zod from 'drizzle-orm/zod';
|
|
@@ -135,6 +135,12 @@ type FinbricksForeignPaymentBody = {
|
|
|
135
135
|
psuId?: string;
|
|
136
136
|
segmentContextType?: 'RETAIL' | 'CORPORATE';
|
|
137
137
|
paymentProvider: string;
|
|
138
|
+
postalAddress?: {
|
|
139
|
+
streetName?: string;
|
|
140
|
+
buildingNumber?: string;
|
|
141
|
+
town?: string;
|
|
142
|
+
country?: string;
|
|
143
|
+
};
|
|
138
144
|
};
|
|
139
145
|
creditor: {
|
|
140
146
|
accountIdentification: {
|
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.Bzl0ao-B.mjs';
|
|
2
2
|
export { A as ACCOUNT_STATUSES, B as BATCH_MODES, a as BATCH_STATUES, a as BATCH_STATUSES, C as CHARGE_BEARERS, b as CONNECTOR_KEYS, c as COUNTRY_CODES, d as CREDENTIALS_TYPES, I as INSTRUCTION_PRIORITIES, P as PAYMENT_DIRECTIONS, e as PAYMENT_REQUEST_STATUSES, f as PAYMENT_STATUSES, g as PAYMENT_TYPES, T as TOKEN_TYPES } from './shared/bank.BzDNLxB_.mjs';
|
|
3
3
|
export { i as isBatchAuthorized, a as isBatchCompleted, b as isBatchFailed, c as isBatchInitiated, d as isBatchProcessing, e as isBatchReadyToSign } from './shared/bank.XqSw509X.mjs';
|
|
4
4
|
export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|