@develit-services/bank 0.8.10 → 0.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/database/schema.d.cts +1 -1
- package/dist/database/schema.d.mts +1 -1
- package/dist/database/schema.d.ts +1 -1
- package/dist/export/worker.cjs +31 -19
- package/dist/export/worker.d.cts +6 -6
- package/dist/export/worker.d.mts +6 -6
- package/dist/export/worker.d.ts +6 -6
- package/dist/export/worker.mjs +31 -19
- package/dist/export/workflows.cjs +1 -1
- package/dist/export/workflows.mjs +1 -1
- package/dist/shared/{bank.BCop1cDT.d.mts → bank.6tfb_FtX.d.cts} +1 -1
- package/dist/shared/{bank.CjTfEd1Q.d.cts → bank.D2WhTzUZ.d.mts} +1 -1
- package/dist/shared/{bank.CUvVxlHy.cjs → bank.DxK5hIgy.cjs} +3 -37
- package/dist/shared/{bank.D-O_gmmZ.mjs → bank.tjCvxaMD.mjs} +3 -37
- package/dist/shared/{bank.Cj2Goq7s.d.ts → bank.wu66knCH.d.cts} +2 -2
- package/dist/shared/{bank.Cj2Goq7s.d.cts → bank.wu66knCH.d.mts} +2 -2
- package/dist/shared/{bank.Cj2Goq7s.d.mts → bank.wu66knCH.d.ts} +2 -2
- package/dist/shared/{bank.OlDt7dpb.d.ts → bank.yd5SsClY.d.ts} +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.d.cts +4 -4
- package/dist/types.d.mts +4 -4
- package/dist/types.d.ts +4 -4
- package/dist/types.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aw as account, ax as accountCredentials, ay as batch, az as ott, aA as payment, aB as paymentRelations, aC as paymentRequest, aD as paymentRequestRelations } from '../shared/bank.
|
|
1
|
+
export { aw as account, ax as accountCredentials, ay as batch, az as ott, aA as payment, aB as paymentRelations, aC as paymentRequest, aD as paymentRequestRelations } from '../shared/bank.wu66knCH.cjs';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import '@develit-io/backend-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aw as account, ax as accountCredentials, ay as batch, az as ott, aA as payment, aB as paymentRelations, aC as paymentRequest, aD as paymentRequestRelations } from '../shared/bank.
|
|
1
|
+
export { aw as account, ax as accountCredentials, ay as batch, az as ott, aA as payment, aB as paymentRelations, aC as paymentRequest, aD as paymentRequestRelations } from '../shared/bank.wu66knCH.mjs';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import '@develit-io/backend-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aw as account, ax as accountCredentials, ay as batch, az as ott, aA as payment, aB as paymentRelations, aC as paymentRequest, aD as paymentRequestRelations } from '../shared/bank.
|
|
1
|
+
export { aw as account, ax as accountCredentials, ay as batch, az as ott, aA as payment, aB as paymentRelations, aC as paymentRequest, aD as paymentRequestRelations } from '../shared/bank.wu66knCH.js';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import '@develit-io/backend-sdk';
|
package/dist/export/worker.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const drizzle = require('../shared/bank.Cev1E9sk.cjs');
|
|
|
5
5
|
const drizzleOrm = require('drizzle-orm');
|
|
6
6
|
const cloudflare_workers = require('cloudflare:workers');
|
|
7
7
|
const d1 = require('drizzle-orm/d1');
|
|
8
|
-
const mock_connector = require('../shared/bank.
|
|
8
|
+
const mock_connector = require('../shared/bank.DxK5hIgy.cjs');
|
|
9
9
|
require('jose');
|
|
10
10
|
const zod = require('zod');
|
|
11
11
|
const paymentRequest_schema = require('../shared/bank.BBXoZ5QU.cjs');
|
|
@@ -1212,17 +1212,29 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
1212
1212
|
{ successMessage: "Payment initiated successfully" },
|
|
1213
1213
|
async (data) => {
|
|
1214
1214
|
const incomingPayment = mock_connector.toIncomingPayment(data);
|
|
1215
|
+
this._validatePaymentTypeAndCurrency(
|
|
1216
|
+
data.paymentType,
|
|
1217
|
+
data.currency,
|
|
1218
|
+
data.creditor
|
|
1219
|
+
);
|
|
1215
1220
|
const { accounts } = await this._getAccounts();
|
|
1216
1221
|
const account = accounts.find(
|
|
1217
|
-
(acc) => acc.iban === incomingPayment.debtorIban
|
|
1222
|
+
(acc) => acc.iban === incomingPayment.debtorIban
|
|
1218
1223
|
);
|
|
1219
1224
|
if (!account) {
|
|
1220
1225
|
throw backendSdk.createInternalError(null, {
|
|
1221
|
-
message: `No account found for IBAN ${incomingPayment.debtorIban}
|
|
1226
|
+
message: `No account found for IBAN ${incomingPayment.debtorIban}`,
|
|
1222
1227
|
code: "VALID-B-004",
|
|
1223
1228
|
status: 422
|
|
1224
1229
|
});
|
|
1225
1230
|
}
|
|
1231
|
+
if (account.currency !== data.currency) {
|
|
1232
|
+
throw backendSdk.createInternalError(null, {
|
|
1233
|
+
message: `Account ${account.iban} has currency ${account.currency}, but payment requires ${data.currency}`,
|
|
1234
|
+
code: "VALID-B-010",
|
|
1235
|
+
status: 422
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1226
1238
|
if (account.status !== "AUTHORIZED") {
|
|
1227
1239
|
throw backendSdk.createInternalError(null, {
|
|
1228
1240
|
message: `Account ${account.iban} is not authorized (status: ${account.status})`,
|
|
@@ -1240,11 +1252,6 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
1240
1252
|
status: 422
|
|
1241
1253
|
});
|
|
1242
1254
|
}
|
|
1243
|
-
this._validatePaymentTypeAndCurrency(
|
|
1244
|
-
data.paymentType,
|
|
1245
|
-
data.currency,
|
|
1246
|
-
data.creditor
|
|
1247
|
-
);
|
|
1248
1255
|
const accountAssigned = mock_connector.assignAccount(incomingPayment, account);
|
|
1249
1256
|
const batchedPayment = mock_connector.toBatchedPayment(accountAssigned);
|
|
1250
1257
|
const { command: insertPaymentRequest } = createPaymentRequestCommand(
|
|
@@ -1323,17 +1330,29 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
1323
1330
|
});
|
|
1324
1331
|
}
|
|
1325
1332
|
}
|
|
1333
|
+
for (const p of paymentInputs) {
|
|
1334
|
+
this._validatePaymentTypeAndCurrency(
|
|
1335
|
+
p.paymentType,
|
|
1336
|
+
p.currency,
|
|
1337
|
+
p.creditor
|
|
1338
|
+
);
|
|
1339
|
+
}
|
|
1326
1340
|
const { accounts } = await this._getAccounts();
|
|
1327
|
-
const account = accounts.find(
|
|
1328
|
-
(acc) => acc.iban === debtorIban && acc.currency === currency
|
|
1329
|
-
);
|
|
1341
|
+
const account = accounts.find((acc) => acc.iban === debtorIban);
|
|
1330
1342
|
if (!account) {
|
|
1331
1343
|
throw backendSdk.createInternalError(null, {
|
|
1332
|
-
message: `No account found for IBAN ${debtorIban}
|
|
1344
|
+
message: `No account found for IBAN ${debtorIban}`,
|
|
1333
1345
|
code: "VALID-B-004",
|
|
1334
1346
|
status: 422
|
|
1335
1347
|
});
|
|
1336
1348
|
}
|
|
1349
|
+
if (account.currency !== currency) {
|
|
1350
|
+
throw backendSdk.createInternalError(null, {
|
|
1351
|
+
message: `Account ${account.iban} has currency ${account.currency}, but payments require ${currency}`,
|
|
1352
|
+
code: "VALID-B-010",
|
|
1353
|
+
status: 422
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1337
1356
|
if (account.status !== "AUTHORIZED") {
|
|
1338
1357
|
throw backendSdk.createInternalError(null, {
|
|
1339
1358
|
message: `Account ${account.iban} is not authorized (status: ${account.status})`,
|
|
@@ -1358,13 +1377,6 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
1358
1377
|
status: 422
|
|
1359
1378
|
});
|
|
1360
1379
|
}
|
|
1361
|
-
for (const p of paymentInputs) {
|
|
1362
|
-
this._validatePaymentTypeAndCurrency(
|
|
1363
|
-
p.paymentType,
|
|
1364
|
-
p.currency,
|
|
1365
|
-
p.creditor
|
|
1366
|
-
);
|
|
1367
|
-
}
|
|
1368
1380
|
const incomingPayments = paymentInputs.map(mock_connector.toIncomingPayment);
|
|
1369
1381
|
const batchedPayments = incomingPayments.map(
|
|
1370
1382
|
(p) => mock_connector.toBatchedPayment(mock_connector.assignAccount(p, account))
|
package/dist/export/worker.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, a as PaymentRequestSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, b as ConnectorKey, I as IBankConnector, c as PaymentType, d as CurrencyCode, H as HandleAuthorizationCallbackInput, e as HandleAuthorizationCallbackOutput } from '../shared/bank.
|
|
2
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.
|
|
1
|
+
import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, a as PaymentRequestSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, b as ConnectorKey, I as IBankConnector, c as PaymentType, d as CurrencyCode, H as HandleAuthorizationCallbackInput, e as HandleAuthorizationCallbackOutput } from '../shared/bank.wu66knCH.cjs';
|
|
2
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.6tfb_FtX.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';
|
|
@@ -1727,9 +1727,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
1727
1727
|
limit: z.ZodNumber;
|
|
1728
1728
|
sort: z.ZodObject<{
|
|
1729
1729
|
column: z.ZodEnum<{
|
|
1730
|
+
amount: "amount";
|
|
1730
1731
|
createdAt: "createdAt";
|
|
1731
1732
|
updatedAt: "updatedAt";
|
|
1732
|
-
amount: "amount";
|
|
1733
1733
|
}>;
|
|
1734
1734
|
direction: z.ZodEnum<{
|
|
1735
1735
|
asc: "asc";
|
|
@@ -2592,9 +2592,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
2592
2592
|
limit: z.ZodNumber;
|
|
2593
2593
|
sort: z.ZodObject<{
|
|
2594
2594
|
column: z.ZodEnum<{
|
|
2595
|
+
amount: "amount";
|
|
2595
2596
|
createdAt: "createdAt";
|
|
2596
2597
|
updatedAt: "updatedAt";
|
|
2597
|
-
amount: "amount";
|
|
2598
2598
|
}>;
|
|
2599
2599
|
direction: z.ZodEnum<{
|
|
2600
2600
|
asc: "asc";
|
|
@@ -2603,16 +2603,16 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
2603
2603
|
}, z.core.$strip>;
|
|
2604
2604
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2605
2605
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2606
|
-
AUTHORIZED: "AUTHORIZED";
|
|
2607
2606
|
OPENED: "OPENED";
|
|
2607
|
+
AUTHORIZED: "AUTHORIZED";
|
|
2608
2608
|
COMPLETED: "COMPLETED";
|
|
2609
2609
|
BOOKED: "BOOKED";
|
|
2610
2610
|
SETTLED: "SETTLED";
|
|
2611
2611
|
REJECTED: "REJECTED";
|
|
2612
2612
|
CLOSED: "CLOSED";
|
|
2613
2613
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2614
|
-
AUTHORIZED: "AUTHORIZED";
|
|
2615
2614
|
OPENED: "OPENED";
|
|
2615
|
+
AUTHORIZED: "AUTHORIZED";
|
|
2616
2616
|
COMPLETED: "COMPLETED";
|
|
2617
2617
|
BOOKED: "BOOKED";
|
|
2618
2618
|
SETTLED: "SETTLED";
|
package/dist/export/worker.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, a as PaymentRequestSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, b as ConnectorKey, I as IBankConnector, c as PaymentType, d as CurrencyCode, H as HandleAuthorizationCallbackInput, e as HandleAuthorizationCallbackOutput } from '../shared/bank.
|
|
2
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.
|
|
1
|
+
import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, a as PaymentRequestSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, b as ConnectorKey, I as IBankConnector, c as PaymentType, d as CurrencyCode, H as HandleAuthorizationCallbackInput, e as HandleAuthorizationCallbackOutput } from '../shared/bank.wu66knCH.mjs';
|
|
2
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.D2WhTzUZ.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';
|
|
@@ -1727,9 +1727,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
1727
1727
|
limit: z.ZodNumber;
|
|
1728
1728
|
sort: z.ZodObject<{
|
|
1729
1729
|
column: z.ZodEnum<{
|
|
1730
|
+
amount: "amount";
|
|
1730
1731
|
createdAt: "createdAt";
|
|
1731
1732
|
updatedAt: "updatedAt";
|
|
1732
|
-
amount: "amount";
|
|
1733
1733
|
}>;
|
|
1734
1734
|
direction: z.ZodEnum<{
|
|
1735
1735
|
asc: "asc";
|
|
@@ -2592,9 +2592,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
2592
2592
|
limit: z.ZodNumber;
|
|
2593
2593
|
sort: z.ZodObject<{
|
|
2594
2594
|
column: z.ZodEnum<{
|
|
2595
|
+
amount: "amount";
|
|
2595
2596
|
createdAt: "createdAt";
|
|
2596
2597
|
updatedAt: "updatedAt";
|
|
2597
|
-
amount: "amount";
|
|
2598
2598
|
}>;
|
|
2599
2599
|
direction: z.ZodEnum<{
|
|
2600
2600
|
asc: "asc";
|
|
@@ -2603,16 +2603,16 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
2603
2603
|
}, z.core.$strip>;
|
|
2604
2604
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2605
2605
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2606
|
-
AUTHORIZED: "AUTHORIZED";
|
|
2607
2606
|
OPENED: "OPENED";
|
|
2607
|
+
AUTHORIZED: "AUTHORIZED";
|
|
2608
2608
|
COMPLETED: "COMPLETED";
|
|
2609
2609
|
BOOKED: "BOOKED";
|
|
2610
2610
|
SETTLED: "SETTLED";
|
|
2611
2611
|
REJECTED: "REJECTED";
|
|
2612
2612
|
CLOSED: "CLOSED";
|
|
2613
2613
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2614
|
-
AUTHORIZED: "AUTHORIZED";
|
|
2615
2614
|
OPENED: "OPENED";
|
|
2615
|
+
AUTHORIZED: "AUTHORIZED";
|
|
2616
2616
|
COMPLETED: "COMPLETED";
|
|
2617
2617
|
BOOKED: "BOOKED";
|
|
2618
2618
|
SETTLED: "SETTLED";
|
package/dist/export/worker.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, a as PaymentRequestSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, b as ConnectorKey, I as IBankConnector, c as PaymentType, d as CurrencyCode, H as HandleAuthorizationCallbackInput, e as HandleAuthorizationCallbackOutput } from '../shared/bank.
|
|
2
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.
|
|
1
|
+
import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, a as PaymentRequestSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, b as ConnectorKey, I as IBankConnector, c as PaymentType, d as CurrencyCode, H as HandleAuthorizationCallbackInput, e as HandleAuthorizationCallbackOutput } from '../shared/bank.wu66knCH.js';
|
|
2
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.yd5SsClY.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';
|
|
@@ -1727,9 +1727,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
1727
1727
|
limit: z.ZodNumber;
|
|
1728
1728
|
sort: z.ZodObject<{
|
|
1729
1729
|
column: z.ZodEnum<{
|
|
1730
|
+
amount: "amount";
|
|
1730
1731
|
createdAt: "createdAt";
|
|
1731
1732
|
updatedAt: "updatedAt";
|
|
1732
|
-
amount: "amount";
|
|
1733
1733
|
}>;
|
|
1734
1734
|
direction: z.ZodEnum<{
|
|
1735
1735
|
asc: "asc";
|
|
@@ -2592,9 +2592,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
2592
2592
|
limit: z.ZodNumber;
|
|
2593
2593
|
sort: z.ZodObject<{
|
|
2594
2594
|
column: z.ZodEnum<{
|
|
2595
|
+
amount: "amount";
|
|
2595
2596
|
createdAt: "createdAt";
|
|
2596
2597
|
updatedAt: "updatedAt";
|
|
2597
|
-
amount: "amount";
|
|
2598
2598
|
}>;
|
|
2599
2599
|
direction: z.ZodEnum<{
|
|
2600
2600
|
asc: "asc";
|
|
@@ -2603,16 +2603,16 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
2603
2603
|
}, z.core.$strip>;
|
|
2604
2604
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2605
2605
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2606
|
-
AUTHORIZED: "AUTHORIZED";
|
|
2607
2606
|
OPENED: "OPENED";
|
|
2607
|
+
AUTHORIZED: "AUTHORIZED";
|
|
2608
2608
|
COMPLETED: "COMPLETED";
|
|
2609
2609
|
BOOKED: "BOOKED";
|
|
2610
2610
|
SETTLED: "SETTLED";
|
|
2611
2611
|
REJECTED: "REJECTED";
|
|
2612
2612
|
CLOSED: "CLOSED";
|
|
2613
2613
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2614
|
-
AUTHORIZED: "AUTHORIZED";
|
|
2615
2614
|
OPENED: "OPENED";
|
|
2615
|
+
AUTHORIZED: "AUTHORIZED";
|
|
2616
2616
|
COMPLETED: "COMPLETED";
|
|
2617
2617
|
BOOKED: "BOOKED";
|
|
2618
2618
|
SETTLED: "SETTLED";
|
package/dist/export/worker.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { t as tables, h as encrypt, d as createCredentialsResolver, e as updateP
|
|
|
3
3
|
import { eq, sql, and, like, asc, desc, inArray, gte, lte, isNull, count, not } from 'drizzle-orm';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { drizzle } from 'drizzle-orm/d1';
|
|
6
|
-
import { j as initiateConnector, g as toIncomingPayment, d as assignAccount, t as toBatchedPayment, h as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from '../shared/bank.
|
|
6
|
+
import { j as initiateConnector, g as toIncomingPayment, d as assignAccount, t as toBatchedPayment, h as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from '../shared/bank.tjCvxaMD.mjs';
|
|
7
7
|
import 'jose';
|
|
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, k as accountInsertSchema, e as PAYMENT_REQUEST_STATUSES } from '../shared/bank.CXBeULUL.mjs';
|
|
@@ -1210,17 +1210,29 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
1210
1210
|
{ successMessage: "Payment initiated successfully" },
|
|
1211
1211
|
async (data) => {
|
|
1212
1212
|
const incomingPayment = toIncomingPayment(data);
|
|
1213
|
+
this._validatePaymentTypeAndCurrency(
|
|
1214
|
+
data.paymentType,
|
|
1215
|
+
data.currency,
|
|
1216
|
+
data.creditor
|
|
1217
|
+
);
|
|
1213
1218
|
const { accounts } = await this._getAccounts();
|
|
1214
1219
|
const account = accounts.find(
|
|
1215
|
-
(acc) => acc.iban === incomingPayment.debtorIban
|
|
1220
|
+
(acc) => acc.iban === incomingPayment.debtorIban
|
|
1216
1221
|
);
|
|
1217
1222
|
if (!account) {
|
|
1218
1223
|
throw createInternalError(null, {
|
|
1219
|
-
message: `No account found for IBAN ${incomingPayment.debtorIban}
|
|
1224
|
+
message: `No account found for IBAN ${incomingPayment.debtorIban}`,
|
|
1220
1225
|
code: "VALID-B-004",
|
|
1221
1226
|
status: 422
|
|
1222
1227
|
});
|
|
1223
1228
|
}
|
|
1229
|
+
if (account.currency !== data.currency) {
|
|
1230
|
+
throw createInternalError(null, {
|
|
1231
|
+
message: `Account ${account.iban} has currency ${account.currency}, but payment requires ${data.currency}`,
|
|
1232
|
+
code: "VALID-B-010",
|
|
1233
|
+
status: 422
|
|
1234
|
+
});
|
|
1235
|
+
}
|
|
1224
1236
|
if (account.status !== "AUTHORIZED") {
|
|
1225
1237
|
throw createInternalError(null, {
|
|
1226
1238
|
message: `Account ${account.iban} is not authorized (status: ${account.status})`,
|
|
@@ -1238,11 +1250,6 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
1238
1250
|
status: 422
|
|
1239
1251
|
});
|
|
1240
1252
|
}
|
|
1241
|
-
this._validatePaymentTypeAndCurrency(
|
|
1242
|
-
data.paymentType,
|
|
1243
|
-
data.currency,
|
|
1244
|
-
data.creditor
|
|
1245
|
-
);
|
|
1246
1253
|
const accountAssigned = assignAccount(incomingPayment, account);
|
|
1247
1254
|
const batchedPayment = toBatchedPayment(accountAssigned);
|
|
1248
1255
|
const { command: insertPaymentRequest } = createPaymentRequestCommand(
|
|
@@ -1321,17 +1328,29 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
1321
1328
|
});
|
|
1322
1329
|
}
|
|
1323
1330
|
}
|
|
1331
|
+
for (const p of paymentInputs) {
|
|
1332
|
+
this._validatePaymentTypeAndCurrency(
|
|
1333
|
+
p.paymentType,
|
|
1334
|
+
p.currency,
|
|
1335
|
+
p.creditor
|
|
1336
|
+
);
|
|
1337
|
+
}
|
|
1324
1338
|
const { accounts } = await this._getAccounts();
|
|
1325
|
-
const account = accounts.find(
|
|
1326
|
-
(acc) => acc.iban === debtorIban && acc.currency === currency
|
|
1327
|
-
);
|
|
1339
|
+
const account = accounts.find((acc) => acc.iban === debtorIban);
|
|
1328
1340
|
if (!account) {
|
|
1329
1341
|
throw createInternalError(null, {
|
|
1330
|
-
message: `No account found for IBAN ${debtorIban}
|
|
1342
|
+
message: `No account found for IBAN ${debtorIban}`,
|
|
1331
1343
|
code: "VALID-B-004",
|
|
1332
1344
|
status: 422
|
|
1333
1345
|
});
|
|
1334
1346
|
}
|
|
1347
|
+
if (account.currency !== currency) {
|
|
1348
|
+
throw createInternalError(null, {
|
|
1349
|
+
message: `Account ${account.iban} has currency ${account.currency}, but payments require ${currency}`,
|
|
1350
|
+
code: "VALID-B-010",
|
|
1351
|
+
status: 422
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1335
1354
|
if (account.status !== "AUTHORIZED") {
|
|
1336
1355
|
throw createInternalError(null, {
|
|
1337
1356
|
message: `Account ${account.iban} is not authorized (status: ${account.status})`,
|
|
@@ -1356,13 +1375,6 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
1356
1375
|
status: 422
|
|
1357
1376
|
});
|
|
1358
1377
|
}
|
|
1359
|
-
for (const p of paymentInputs) {
|
|
1360
|
-
this._validatePaymentTypeAndCurrency(
|
|
1361
|
-
p.paymentType,
|
|
1362
|
-
p.currency,
|
|
1363
|
-
p.creditor
|
|
1364
|
-
);
|
|
1365
|
-
}
|
|
1366
1378
|
const incomingPayments = paymentInputs.map(toIncomingPayment);
|
|
1367
1379
|
const batchedPayments = incomingPayments.map(
|
|
1368
1380
|
(p) => toBatchedPayment(assignAccount(p, account))
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
4
|
const drizzle = require('../shared/bank.Cev1E9sk.cjs');
|
|
5
5
|
const batchLifecycle = require('../shared/bank.BsIiXsFH.cjs');
|
|
6
|
-
const mock_connector = require('../shared/bank.
|
|
6
|
+
const mock_connector = require('../shared/bank.DxK5hIgy.cjs');
|
|
7
7
|
const drizzleOrm = require('drizzle-orm');
|
|
8
8
|
const cloudflare_workers = require('cloudflare:workers');
|
|
9
9
|
const cloudflare_workflows = require('cloudflare:workflows');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { first, uuidv4, asNonEmpty } from '@develit-io/backend-sdk';
|
|
2
2
|
import { t as tables, 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.xB9eTN77.mjs';
|
|
3
3
|
import { i as isBatchAuthorized, b as isBatchFailed, d as isBatchProcessing, f as isPaymentCompleted } from '../shared/bank.vz1uqEYa.mjs';
|
|
4
|
-
import { e as toBatchedPaymentFromPaymentRequest, i as toPreparedPayment, j as initiateConnector } from '../shared/bank.
|
|
4
|
+
import { e as toBatchedPaymentFromPaymentRequest, i as toPreparedPayment, j as initiateConnector } from '../shared/bank.tjCvxaMD.mjs';
|
|
5
5
|
import { eq, and, inArray } from 'drizzle-orm';
|
|
6
6
|
import { WorkflowEntrypoint } from 'cloudflare:workers';
|
|
7
7
|
import { NonRetryableError } from 'cloudflare:workflows';
|
|
@@ -1269,30 +1269,6 @@ const calculateCzechIban = (accountNumber, bankCode) => {
|
|
|
1269
1269
|
return `CZ${checkDigits}${basicIban}`;
|
|
1270
1270
|
};
|
|
1271
1271
|
|
|
1272
|
-
function parseFlatAddress(addr, fallbackCountry) {
|
|
1273
|
-
if (!addr) {
|
|
1274
|
-
return {
|
|
1275
|
-
streetName: null,
|
|
1276
|
-
buildingNumber: null,
|
|
1277
|
-
city: null,
|
|
1278
|
-
zip: null,
|
|
1279
|
-
countryCode: fallbackCountry
|
|
1280
|
-
};
|
|
1281
|
-
}
|
|
1282
|
-
const parts = addr.split(",").map((p) => p.trim());
|
|
1283
|
-
const streetPart = parts[0];
|
|
1284
|
-
const cityPart = parts[1];
|
|
1285
|
-
const countryCode = parts[2]?.trim() || fallbackCountry;
|
|
1286
|
-
const streetMatch = streetPart?.match(/^(.+?)\s+(\d+\w*)$/);
|
|
1287
|
-
const cityMatch = cityPart?.match(/^(\d[\d ]*?)\s+(.+)$/);
|
|
1288
|
-
return {
|
|
1289
|
-
streetName: streetMatch?.[1] ?? streetPart ?? null,
|
|
1290
|
-
buildingNumber: streetMatch?.[2] ?? null,
|
|
1291
|
-
city: cityMatch?.[2] ?? cityPart ?? null,
|
|
1292
|
-
zip: cityMatch?.[1]?.replace(/\s/g, "") ?? null,
|
|
1293
|
-
countryCode
|
|
1294
|
-
};
|
|
1295
|
-
}
|
|
1296
1272
|
class DbuConnector extends IBankConnector {
|
|
1297
1273
|
constructor({
|
|
1298
1274
|
BASE_URL,
|
|
@@ -1614,15 +1590,7 @@ class DbuConnector extends IBankConnector {
|
|
|
1614
1590
|
specSymbol: payment.ss,
|
|
1615
1591
|
constSymbol: payment.ks,
|
|
1616
1592
|
uniqueExternalId: payment.id,
|
|
1617
|
-
with4EyeApproval: "Y"
|
|
1618
|
-
debtorAddress: parseFlatAddress(
|
|
1619
|
-
payment.debtor.address,
|
|
1620
|
-
payment.debtor.countryCode || "CZ"
|
|
1621
|
-
),
|
|
1622
|
-
creditorAddress: parseFlatAddress(
|
|
1623
|
-
payment.creditor.address,
|
|
1624
|
-
payment.creditor.countryCode || "CZ"
|
|
1625
|
-
)
|
|
1593
|
+
with4EyeApproval: "Y"
|
|
1626
1594
|
};
|
|
1627
1595
|
const response = await this.makeRequest(
|
|
1628
1596
|
"/required-transactions",
|
|
@@ -1669,8 +1637,6 @@ class DbuConnector extends IBankConnector {
|
|
|
1669
1637
|
filter
|
|
1670
1638
|
}) {
|
|
1671
1639
|
try {
|
|
1672
|
-
const dateFrom = dateFns.format(filter.dateFrom, "yyyy-MM-dd");
|
|
1673
|
-
const dateTo = dateFns.format(filter.dateTo || /* @__PURE__ */ new Date(), "yyyy-MM-dd");
|
|
1674
1640
|
const allPayments = [];
|
|
1675
1641
|
let offset = 0;
|
|
1676
1642
|
const limit = 10;
|
|
@@ -1688,8 +1654,8 @@ class DbuConnector extends IBankConnector {
|
|
|
1688
1654
|
// 'filter.mainAccount': account.number!,
|
|
1689
1655
|
// Date filtering
|
|
1690
1656
|
"filter.idAccount": account.bankRefId,
|
|
1691
|
-
|
|
1692
|
-
|
|
1657
|
+
// 'filter.validFromStart': dateFrom,
|
|
1658
|
+
// 'filter.validFromEnd': dateTo,
|
|
1693
1659
|
// Pagination parameters
|
|
1694
1660
|
offset: offset.toString(),
|
|
1695
1661
|
limit: limit.toString()
|
|
@@ -1267,30 +1267,6 @@ const calculateCzechIban = (accountNumber, bankCode) => {
|
|
|
1267
1267
|
return `CZ${checkDigits}${basicIban}`;
|
|
1268
1268
|
};
|
|
1269
1269
|
|
|
1270
|
-
function parseFlatAddress(addr, fallbackCountry) {
|
|
1271
|
-
if (!addr) {
|
|
1272
|
-
return {
|
|
1273
|
-
streetName: null,
|
|
1274
|
-
buildingNumber: null,
|
|
1275
|
-
city: null,
|
|
1276
|
-
zip: null,
|
|
1277
|
-
countryCode: fallbackCountry
|
|
1278
|
-
};
|
|
1279
|
-
}
|
|
1280
|
-
const parts = addr.split(",").map((p) => p.trim());
|
|
1281
|
-
const streetPart = parts[0];
|
|
1282
|
-
const cityPart = parts[1];
|
|
1283
|
-
const countryCode = parts[2]?.trim() || fallbackCountry;
|
|
1284
|
-
const streetMatch = streetPart?.match(/^(.+?)\s+(\d+\w*)$/);
|
|
1285
|
-
const cityMatch = cityPart?.match(/^(\d[\d ]*?)\s+(.+)$/);
|
|
1286
|
-
return {
|
|
1287
|
-
streetName: streetMatch?.[1] ?? streetPart ?? null,
|
|
1288
|
-
buildingNumber: streetMatch?.[2] ?? null,
|
|
1289
|
-
city: cityMatch?.[2] ?? cityPart ?? null,
|
|
1290
|
-
zip: cityMatch?.[1]?.replace(/\s/g, "") ?? null,
|
|
1291
|
-
countryCode
|
|
1292
|
-
};
|
|
1293
|
-
}
|
|
1294
1270
|
class DbuConnector extends IBankConnector {
|
|
1295
1271
|
constructor({
|
|
1296
1272
|
BASE_URL,
|
|
@@ -1612,15 +1588,7 @@ class DbuConnector extends IBankConnector {
|
|
|
1612
1588
|
specSymbol: payment.ss,
|
|
1613
1589
|
constSymbol: payment.ks,
|
|
1614
1590
|
uniqueExternalId: payment.id,
|
|
1615
|
-
with4EyeApproval: "Y"
|
|
1616
|
-
debtorAddress: parseFlatAddress(
|
|
1617
|
-
payment.debtor.address,
|
|
1618
|
-
payment.debtor.countryCode || "CZ"
|
|
1619
|
-
),
|
|
1620
|
-
creditorAddress: parseFlatAddress(
|
|
1621
|
-
payment.creditor.address,
|
|
1622
|
-
payment.creditor.countryCode || "CZ"
|
|
1623
|
-
)
|
|
1591
|
+
with4EyeApproval: "Y"
|
|
1624
1592
|
};
|
|
1625
1593
|
const response = await this.makeRequest(
|
|
1626
1594
|
"/required-transactions",
|
|
@@ -1667,8 +1635,6 @@ class DbuConnector extends IBankConnector {
|
|
|
1667
1635
|
filter
|
|
1668
1636
|
}) {
|
|
1669
1637
|
try {
|
|
1670
|
-
const dateFrom = format(filter.dateFrom, "yyyy-MM-dd");
|
|
1671
|
-
const dateTo = format(filter.dateTo || /* @__PURE__ */ new Date(), "yyyy-MM-dd");
|
|
1672
1638
|
const allPayments = [];
|
|
1673
1639
|
let offset = 0;
|
|
1674
1640
|
const limit = 10;
|
|
@@ -1686,8 +1652,8 @@ class DbuConnector extends IBankConnector {
|
|
|
1686
1652
|
// 'filter.mainAccount': account.number!,
|
|
1687
1653
|
// Date filtering
|
|
1688
1654
|
"filter.idAccount": account.bankRefId,
|
|
1689
|
-
|
|
1690
|
-
|
|
1655
|
+
// 'filter.validFromStart': dateFrom,
|
|
1656
|
+
// 'filter.validFromEnd': dateTo,
|
|
1691
1657
|
// Pagination parameters
|
|
1692
1658
|
offset: offset.toString(),
|
|
1693
1659
|
limit: limit.toString()
|
|
@@ -3692,7 +3692,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3692
3692
|
tableName: "payment_request";
|
|
3693
3693
|
dataType: "string";
|
|
3694
3694
|
columnType: "SQLiteText";
|
|
3695
|
-
data: "
|
|
3695
|
+
data: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
3696
3696
|
driverParam: string;
|
|
3697
3697
|
notNull: true;
|
|
3698
3698
|
hasDefault: false;
|
|
@@ -3705,7 +3705,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3705
3705
|
generated: undefined;
|
|
3706
3706
|
}, {}, {
|
|
3707
3707
|
length: number | undefined;
|
|
3708
|
-
$type: "
|
|
3708
|
+
$type: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
3709
3709
|
}>;
|
|
3710
3710
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3711
3711
|
name: "status_reason";
|
|
@@ -3692,7 +3692,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3692
3692
|
tableName: "payment_request";
|
|
3693
3693
|
dataType: "string";
|
|
3694
3694
|
columnType: "SQLiteText";
|
|
3695
|
-
data: "
|
|
3695
|
+
data: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
3696
3696
|
driverParam: string;
|
|
3697
3697
|
notNull: true;
|
|
3698
3698
|
hasDefault: false;
|
|
@@ -3705,7 +3705,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3705
3705
|
generated: undefined;
|
|
3706
3706
|
}, {}, {
|
|
3707
3707
|
length: number | undefined;
|
|
3708
|
-
$type: "
|
|
3708
|
+
$type: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
3709
3709
|
}>;
|
|
3710
3710
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3711
3711
|
name: "status_reason";
|
|
@@ -3692,7 +3692,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3692
3692
|
tableName: "payment_request";
|
|
3693
3693
|
dataType: "string";
|
|
3694
3694
|
columnType: "SQLiteText";
|
|
3695
|
-
data: "
|
|
3695
|
+
data: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
3696
3696
|
driverParam: string;
|
|
3697
3697
|
notNull: true;
|
|
3698
3698
|
hasDefault: false;
|
|
@@ -3705,7 +3705,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3705
3705
|
generated: undefined;
|
|
3706
3706
|
}, {}, {
|
|
3707
3707
|
length: number | undefined;
|
|
3708
|
-
$type: "
|
|
3708
|
+
$type: "OPENED" | "AUTHORIZED" | "COMPLETED" | "BOOKED" | "SETTLED" | "REJECTED" | "CLOSED";
|
|
3709
3709
|
}>;
|
|
3710
3710
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3711
3711
|
name: "status_reason";
|
package/dist/types.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const mock_connector = require('./shared/bank.
|
|
3
|
+
const mock_connector = require('./shared/bank.DxK5hIgy.cjs');
|
|
4
4
|
const paymentRequest_schema = require('./shared/bank.BBXoZ5QU.cjs');
|
|
5
5
|
const batchLifecycle = require('./shared/bank.BsIiXsFH.cjs');
|
|
6
6
|
const generalCodes = require('@develit-io/general-codes');
|
package/dist/types.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, b as ConnectorKey, f as ConnectedAccount, c as PaymentType, g as CredentialsResolver, h as AccountCredentialsInsertType, i as AccountInsertType, j as BatchedPayment, k as InitiatedBatch, l as IncomingPayment, m as InitiatedPayment, A as AccountSelectType, n as ParsedBankPayment, o as PaymentRequestStatus, p as AuthorizationCallbackResult, q as BatchMetadata, r as Currency, P as PaymentSelectType, a as PaymentRequestSelectType, s as AccountAssignedPayment, u as PreparedPayment, v as CompletedPayment, w as PaymentRequestInsertType } from './shared/bank.
|
|
2
|
-
export { x as ACCOUNT_STATUSES, y as AccountCredentialsPatchType, z as AccountCredentialsSelectType, D as AccountCredentialsUpdateType, E as AccountPatchType, F as AccountStatus, G as AccountUpdateType, J as AuthorizedBatch, K as BATCH_MODES, M as BATCH_STATUES, M as BATCH_STATUSES, N as BankAccountWithLastSync, O as BankCode, Q as BatchInsertType, R as BatchLifecycle, S as BatchMode, T as BatchPayment, B as BatchSelectType, U as BatchStatus, V as CHARGE_BEARERS, W as CONNECTOR_KEYS, X as COUNTRY_CODES, Y as CREDENTIALS_TYPES, Z as ChargeBearer, _ as CompletedBatch, C as ConfigEnvironmentBank, $ as CountryCode, a0 as CredentialsType, d as CurrencyCode, a1 as INSTRUCTION_PRIORITIES, a2 as InstructionPriority, L as LastSyncMetadata, a3 as PAYMENT_DIRECTIONS, a4 as PAYMENT_REQUEST_STATUSES, a5 as PAYMENT_STATUSES, a6 as PAYMENT_TYPES, a7 as PaymentDirection, a8 as PaymentFailedInsertType, a9 as PaymentInsertType, aa as PaymentLifecycle, ab as PaymentPreparedInsertType, ac as PaymentStatus, ad as ProcessingBatch, ae as ReadyToSignBatch, af as ResolvedCredentials, ag as TOKEN_TYPES, ah as TokenType, ai as accountCredentialsInsertSchema, aj as accountCredentialsSelectSchema, ak as accountCredentialsUpdateSchema, al as accountInsertSchema, am as accountSelectSchema, an as accountUpdateSchema, ao as hasPaymentAccountAssigned, ap as isBatchAuthorized, aq as isBatchCompleted, ar as isBatchFailed, as as isBatchInitiated, at as isBatchProcessing, au as isBatchReadyToSign, av as isPaymentCompleted } from './shared/bank.
|
|
3
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
4
|
-
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.
|
|
1
|
+
import { I as IBankConnector, b as ConnectorKey, f as ConnectedAccount, c as PaymentType, g as CredentialsResolver, h as AccountCredentialsInsertType, i as AccountInsertType, j as BatchedPayment, k as InitiatedBatch, l as IncomingPayment, m as InitiatedPayment, A as AccountSelectType, n as ParsedBankPayment, o as PaymentRequestStatus, p as AuthorizationCallbackResult, q as BatchMetadata, r as Currency, P as PaymentSelectType, a as PaymentRequestSelectType, s as AccountAssignedPayment, u as PreparedPayment, v as CompletedPayment, w as PaymentRequestInsertType } from './shared/bank.wu66knCH.cjs';
|
|
2
|
+
export { x as ACCOUNT_STATUSES, y as AccountCredentialsPatchType, z as AccountCredentialsSelectType, D as AccountCredentialsUpdateType, E as AccountPatchType, F as AccountStatus, G as AccountUpdateType, J as AuthorizedBatch, K as BATCH_MODES, M as BATCH_STATUES, M as BATCH_STATUSES, N as BankAccountWithLastSync, O as BankCode, Q as BatchInsertType, R as BatchLifecycle, S as BatchMode, T as BatchPayment, B as BatchSelectType, U as BatchStatus, V as CHARGE_BEARERS, W as CONNECTOR_KEYS, X as COUNTRY_CODES, Y as CREDENTIALS_TYPES, Z as ChargeBearer, _ as CompletedBatch, C as ConfigEnvironmentBank, $ as CountryCode, a0 as CredentialsType, d as CurrencyCode, a1 as INSTRUCTION_PRIORITIES, a2 as InstructionPriority, L as LastSyncMetadata, a3 as PAYMENT_DIRECTIONS, a4 as PAYMENT_REQUEST_STATUSES, a5 as PAYMENT_STATUSES, a6 as PAYMENT_TYPES, a7 as PaymentDirection, a8 as PaymentFailedInsertType, a9 as PaymentInsertType, aa as PaymentLifecycle, ab as PaymentPreparedInsertType, ac as PaymentStatus, ad as ProcessingBatch, ae as ReadyToSignBatch, af as ResolvedCredentials, ag as TOKEN_TYPES, ah as TokenType, ai as accountCredentialsInsertSchema, aj as accountCredentialsSelectSchema, ak as accountCredentialsUpdateSchema, al as accountInsertSchema, am as accountSelectSchema, an as accountUpdateSchema, ao as hasPaymentAccountAssigned, ap as isBatchAuthorized, aq as isBatchCompleted, ar as isBatchFailed, as as isBatchInitiated, at as isBatchProcessing, au as isBatchReadyToSign, av as isPaymentCompleted } from './shared/bank.wu66knCH.cjs';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.6tfb_FtX.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.6tfb_FtX.cjs';
|
|
5
5
|
export { a as BankServiceEnv, b as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.DMjtitKo.cjs';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_zod from 'drizzle-zod';
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, b as ConnectorKey, f as ConnectedAccount, c as PaymentType, g as CredentialsResolver, h as AccountCredentialsInsertType, i as AccountInsertType, j as BatchedPayment, k as InitiatedBatch, l as IncomingPayment, m as InitiatedPayment, A as AccountSelectType, n as ParsedBankPayment, o as PaymentRequestStatus, p as AuthorizationCallbackResult, q as BatchMetadata, r as Currency, P as PaymentSelectType, a as PaymentRequestSelectType, s as AccountAssignedPayment, u as PreparedPayment, v as CompletedPayment, w as PaymentRequestInsertType } from './shared/bank.
|
|
2
|
-
export { x as ACCOUNT_STATUSES, y as AccountCredentialsPatchType, z as AccountCredentialsSelectType, D as AccountCredentialsUpdateType, E as AccountPatchType, F as AccountStatus, G as AccountUpdateType, J as AuthorizedBatch, K as BATCH_MODES, M as BATCH_STATUES, M as BATCH_STATUSES, N as BankAccountWithLastSync, O as BankCode, Q as BatchInsertType, R as BatchLifecycle, S as BatchMode, T as BatchPayment, B as BatchSelectType, U as BatchStatus, V as CHARGE_BEARERS, W as CONNECTOR_KEYS, X as COUNTRY_CODES, Y as CREDENTIALS_TYPES, Z as ChargeBearer, _ as CompletedBatch, C as ConfigEnvironmentBank, $ as CountryCode, a0 as CredentialsType, d as CurrencyCode, a1 as INSTRUCTION_PRIORITIES, a2 as InstructionPriority, L as LastSyncMetadata, a3 as PAYMENT_DIRECTIONS, a4 as PAYMENT_REQUEST_STATUSES, a5 as PAYMENT_STATUSES, a6 as PAYMENT_TYPES, a7 as PaymentDirection, a8 as PaymentFailedInsertType, a9 as PaymentInsertType, aa as PaymentLifecycle, ab as PaymentPreparedInsertType, ac as PaymentStatus, ad as ProcessingBatch, ae as ReadyToSignBatch, af as ResolvedCredentials, ag as TOKEN_TYPES, ah as TokenType, ai as accountCredentialsInsertSchema, aj as accountCredentialsSelectSchema, ak as accountCredentialsUpdateSchema, al as accountInsertSchema, am as accountSelectSchema, an as accountUpdateSchema, ao as hasPaymentAccountAssigned, ap as isBatchAuthorized, aq as isBatchCompleted, ar as isBatchFailed, as as isBatchInitiated, at as isBatchProcessing, au as isBatchReadyToSign, av as isPaymentCompleted } from './shared/bank.
|
|
3
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
4
|
-
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.
|
|
1
|
+
import { I as IBankConnector, b as ConnectorKey, f as ConnectedAccount, c as PaymentType, g as CredentialsResolver, h as AccountCredentialsInsertType, i as AccountInsertType, j as BatchedPayment, k as InitiatedBatch, l as IncomingPayment, m as InitiatedPayment, A as AccountSelectType, n as ParsedBankPayment, o as PaymentRequestStatus, p as AuthorizationCallbackResult, q as BatchMetadata, r as Currency, P as PaymentSelectType, a as PaymentRequestSelectType, s as AccountAssignedPayment, u as PreparedPayment, v as CompletedPayment, w as PaymentRequestInsertType } from './shared/bank.wu66knCH.mjs';
|
|
2
|
+
export { x as ACCOUNT_STATUSES, y as AccountCredentialsPatchType, z as AccountCredentialsSelectType, D as AccountCredentialsUpdateType, E as AccountPatchType, F as AccountStatus, G as AccountUpdateType, J as AuthorizedBatch, K as BATCH_MODES, M as BATCH_STATUES, M as BATCH_STATUSES, N as BankAccountWithLastSync, O as BankCode, Q as BatchInsertType, R as BatchLifecycle, S as BatchMode, T as BatchPayment, B as BatchSelectType, U as BatchStatus, V as CHARGE_BEARERS, W as CONNECTOR_KEYS, X as COUNTRY_CODES, Y as CREDENTIALS_TYPES, Z as ChargeBearer, _ as CompletedBatch, C as ConfigEnvironmentBank, $ as CountryCode, a0 as CredentialsType, d as CurrencyCode, a1 as INSTRUCTION_PRIORITIES, a2 as InstructionPriority, L as LastSyncMetadata, a3 as PAYMENT_DIRECTIONS, a4 as PAYMENT_REQUEST_STATUSES, a5 as PAYMENT_STATUSES, a6 as PAYMENT_TYPES, a7 as PaymentDirection, a8 as PaymentFailedInsertType, a9 as PaymentInsertType, aa as PaymentLifecycle, ab as PaymentPreparedInsertType, ac as PaymentStatus, ad as ProcessingBatch, ae as ReadyToSignBatch, af as ResolvedCredentials, ag as TOKEN_TYPES, ah as TokenType, ai as accountCredentialsInsertSchema, aj as accountCredentialsSelectSchema, ak as accountCredentialsUpdateSchema, al as accountInsertSchema, am as accountSelectSchema, an as accountUpdateSchema, ao as hasPaymentAccountAssigned, ap as isBatchAuthorized, aq as isBatchCompleted, ar as isBatchFailed, as as isBatchInitiated, at as isBatchProcessing, au as isBatchReadyToSign, av as isPaymentCompleted } from './shared/bank.wu66knCH.mjs';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.D2WhTzUZ.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.D2WhTzUZ.mjs';
|
|
5
5
|
export { a as BankServiceEnv, b as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.DMjtitKo.mjs';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_zod from 'drizzle-zod';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, b as ConnectorKey, f as ConnectedAccount, c as PaymentType, g as CredentialsResolver, h as AccountCredentialsInsertType, i as AccountInsertType, j as BatchedPayment, k as InitiatedBatch, l as IncomingPayment, m as InitiatedPayment, A as AccountSelectType, n as ParsedBankPayment, o as PaymentRequestStatus, p as AuthorizationCallbackResult, q as BatchMetadata, r as Currency, P as PaymentSelectType, a as PaymentRequestSelectType, s as AccountAssignedPayment, u as PreparedPayment, v as CompletedPayment, w as PaymentRequestInsertType } from './shared/bank.
|
|
2
|
-
export { x as ACCOUNT_STATUSES, y as AccountCredentialsPatchType, z as AccountCredentialsSelectType, D as AccountCredentialsUpdateType, E as AccountPatchType, F as AccountStatus, G as AccountUpdateType, J as AuthorizedBatch, K as BATCH_MODES, M as BATCH_STATUES, M as BATCH_STATUSES, N as BankAccountWithLastSync, O as BankCode, Q as BatchInsertType, R as BatchLifecycle, S as BatchMode, T as BatchPayment, B as BatchSelectType, U as BatchStatus, V as CHARGE_BEARERS, W as CONNECTOR_KEYS, X as COUNTRY_CODES, Y as CREDENTIALS_TYPES, Z as ChargeBearer, _ as CompletedBatch, C as ConfigEnvironmentBank, $ as CountryCode, a0 as CredentialsType, d as CurrencyCode, a1 as INSTRUCTION_PRIORITIES, a2 as InstructionPriority, L as LastSyncMetadata, a3 as PAYMENT_DIRECTIONS, a4 as PAYMENT_REQUEST_STATUSES, a5 as PAYMENT_STATUSES, a6 as PAYMENT_TYPES, a7 as PaymentDirection, a8 as PaymentFailedInsertType, a9 as PaymentInsertType, aa as PaymentLifecycle, ab as PaymentPreparedInsertType, ac as PaymentStatus, ad as ProcessingBatch, ae as ReadyToSignBatch, af as ResolvedCredentials, ag as TOKEN_TYPES, ah as TokenType, ai as accountCredentialsInsertSchema, aj as accountCredentialsSelectSchema, ak as accountCredentialsUpdateSchema, al as accountInsertSchema, am as accountSelectSchema, an as accountUpdateSchema, ao as hasPaymentAccountAssigned, ap as isBatchAuthorized, aq as isBatchCompleted, ar as isBatchFailed, as as isBatchInitiated, at as isBatchProcessing, au as isBatchReadyToSign, av as isPaymentCompleted } from './shared/bank.
|
|
3
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
4
|
-
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.
|
|
1
|
+
import { I as IBankConnector, b as ConnectorKey, f as ConnectedAccount, c as PaymentType, g as CredentialsResolver, h as AccountCredentialsInsertType, i as AccountInsertType, j as BatchedPayment, k as InitiatedBatch, l as IncomingPayment, m as InitiatedPayment, A as AccountSelectType, n as ParsedBankPayment, o as PaymentRequestStatus, p as AuthorizationCallbackResult, q as BatchMetadata, r as Currency, P as PaymentSelectType, a as PaymentRequestSelectType, s as AccountAssignedPayment, u as PreparedPayment, v as CompletedPayment, w as PaymentRequestInsertType } from './shared/bank.wu66knCH.js';
|
|
2
|
+
export { x as ACCOUNT_STATUSES, y as AccountCredentialsPatchType, z as AccountCredentialsSelectType, D as AccountCredentialsUpdateType, E as AccountPatchType, F as AccountStatus, G as AccountUpdateType, J as AuthorizedBatch, K as BATCH_MODES, M as BATCH_STATUES, M as BATCH_STATUSES, N as BankAccountWithLastSync, O as BankCode, Q as BatchInsertType, R as BatchLifecycle, S as BatchMode, T as BatchPayment, B as BatchSelectType, U as BatchStatus, V as CHARGE_BEARERS, W as CONNECTOR_KEYS, X as COUNTRY_CODES, Y as CREDENTIALS_TYPES, Z as ChargeBearer, _ as CompletedBatch, C as ConfigEnvironmentBank, $ as CountryCode, a0 as CredentialsType, d as CurrencyCode, a1 as INSTRUCTION_PRIORITIES, a2 as InstructionPriority, L as LastSyncMetadata, a3 as PAYMENT_DIRECTIONS, a4 as PAYMENT_REQUEST_STATUSES, a5 as PAYMENT_STATUSES, a6 as PAYMENT_TYPES, a7 as PaymentDirection, a8 as PaymentFailedInsertType, a9 as PaymentInsertType, aa as PaymentLifecycle, ab as PaymentPreparedInsertType, ac as PaymentStatus, ad as ProcessingBatch, ae as ReadyToSignBatch, af as ResolvedCredentials, ag as TOKEN_TYPES, ah as TokenType, ai as accountCredentialsInsertSchema, aj as accountCredentialsSelectSchema, ak as accountCredentialsUpdateSchema, al as accountInsertSchema, am as accountSelectSchema, an as accountUpdateSchema, ao as hasPaymentAccountAssigned, ap as isBatchAuthorized, aq as isBatchCompleted, ar as isBatchFailed, as as isBatchInitiated, at as isBatchProcessing, au as isBatchReadyToSign, av as isPaymentCompleted } from './shared/bank.wu66knCH.js';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.yd5SsClY.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.yd5SsClY.js';
|
|
5
5
|
export { a as BankServiceEnv, b as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.DMjtitKo.js';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_zod from 'drizzle-zod';
|
package/dist/types.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CsobConnector, D as DbuConnector, E as ErsteConnector, F as FINBRICKS_ENDPOINTS, a as FinbricksClient, b as FinbricksConnector, I as IBankConnector, K as KBConnector, M as MockCobsConnector, c as MockConnector, d as assignAccount, s as signFinbricksJws, t as toBatchedPayment, e as toBatchedPaymentFromPaymentRequest, f as toCompletedPayment, g as toIncomingPayment, h as toPaymentRequestInsert, i as toPreparedPayment, u as useFinbricksFetch } from './shared/bank.
|
|
1
|
+
export { C as CsobConnector, D as DbuConnector, E as ErsteConnector, F as FINBRICKS_ENDPOINTS, a as FinbricksClient, b as FinbricksConnector, I as IBankConnector, K as KBConnector, M as MockCobsConnector, c as MockConnector, d as assignAccount, s as signFinbricksJws, t as toBatchedPayment, e as toBatchedPaymentFromPaymentRequest, f as toCompletedPayment, g as toIncomingPayment, h as toPaymentRequestInsert, i as toPreparedPayment, u as useFinbricksFetch } from './shared/bank.tjCvxaMD.mjs';
|
|
2
2
|
export { A as ACCOUNT_STATUSES, B as BATCH_MODES, a as BATCH_STATUES, a as BATCH_STATUSES, C as CHARGE_BEARERS, b as CONNECTOR_KEYS, c as COUNTRY_CODES, d as CREDENTIALS_TYPES, I as INSTRUCTION_PRIORITIES, P as PAYMENT_DIRECTIONS, e as PAYMENT_REQUEST_STATUSES, f as PAYMENT_STATUSES, g as PAYMENT_TYPES, T as TOKEN_TYPES, h as accountCredentialsInsertSchema, i as accountCredentialsSelectSchema, j as accountCredentialsUpdateSchema, k as accountInsertSchema, l as accountSelectSchema, m as accountUpdateSchema, o as ottInsertSchema, n as ottSelectSchema, p as ottUpdateSchema } from './shared/bank.CXBeULUL.mjs';
|
|
3
3
|
export { h as hasPaymentAccountAssigned, i as isBatchAuthorized, a as isBatchCompleted, b as isBatchFailed, c as isBatchInitiated, d as isBatchProcessing, e as isBatchReadyToSign, f as isPaymentCompleted } from './shared/bank.vz1uqEYa.mjs';
|
|
4
4
|
export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|