@develit-services/bank 2.3.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/database/schema.cjs +1 -10
- package/dist/database/schema.d.cts +3 -3
- package/dist/database/schema.d.mts +3 -3
- package/dist/database/schema.d.ts +3 -3
- package/dist/database/schema.mjs +1 -8
- package/dist/export/worker.cjs +137 -137
- package/dist/export/worker.d.cts +115 -451
- package/dist/export/worker.d.mts +115 -451
- package/dist/export/worker.d.ts +115 -451
- package/dist/export/worker.mjs +40 -40
- package/dist/export/workflows.cjs +29 -23
- package/dist/export/workflows.mjs +18 -12
- package/dist/export/wrangler.cjs +7 -12
- package/dist/export/wrangler.d.cts +11 -3
- package/dist/export/wrangler.d.mts +11 -3
- package/dist/export/wrangler.d.ts +11 -3
- package/dist/export/wrangler.mjs +7 -12
- package/dist/shared/bank.9Yw4KHyl.cjs +275 -0
- package/dist/shared/{bank.CxAHQOwW.d.cts → bank.BanqNaZK.d.cts} +9 -9
- package/dist/shared/{bank.BSiA1m0B.mjs → bank.ByesVuDp.mjs} +2 -1
- package/dist/shared/bank.BzDNLxB_.mjs +254 -0
- package/dist/shared/{bank.gVOunsjq.mjs → bank.CTFqGRuY.mjs} +227 -447
- package/dist/shared/{bank.CC4p6Jf-.d.cts → bank.CVCyY-qU.d.cts} +1225 -3788
- package/dist/shared/{bank.CC4p6Jf-.d.mts → bank.CVCyY-qU.d.mts} +1225 -3788
- package/dist/shared/{bank.CC4p6Jf-.d.ts → bank.CVCyY-qU.d.ts} +1225 -3788
- package/dist/shared/{bank.Dl3mNNS2.d.mts → bank.DOlM7clW.d.mts} +9 -9
- package/dist/shared/{bank.DICdNw3T.cjs → bank.OSj3Smwv.cjs} +17 -16
- package/dist/shared/{bank.C5NCnZWS.d.ts → bank.SoKDxQxH.d.ts} +9 -9
- package/dist/shared/{bank.avgw-IRO.cjs → bank.pU2vSCUr.cjs} +234 -474
- package/dist/types.cjs +38 -38
- package/dist/types.d.cts +57 -450
- package/dist/types.d.mts +57 -450
- package/dist/types.d.ts +57 -450
- package/dist/types.mjs +4 -4
- package/package.json +6 -5
- package/dist/shared/{bank.Bz4DIxJL.d.cts → bank.C6sLje8B.d.cts} +3 -3
- package/dist/shared/{bank.Bz4DIxJL.d.mts → bank.C6sLje8B.d.mts} +3 -3
- package/dist/shared/{bank.Bz4DIxJL.d.ts → bank.C6sLje8B.d.ts} +3 -3
|
@@ -1,13 +1,191 @@
|
|
|
1
|
-
import { uuidv4, createInternalError, useResult,
|
|
2
|
-
import { sqliteTable, text, integer, unique, real, index } from 'drizzle-orm/sqlite-core';
|
|
1
|
+
import { uuidv4, createInternalError, useResult, structuredAddressSchema } from '@develit-io/backend-sdk';
|
|
3
2
|
import { format, parseISO } from 'date-fns';
|
|
4
3
|
import { importPKCS8, SignJWT } from 'jose';
|
|
5
4
|
import { z } from 'zod';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { and, not, inArray, isNull } from 'drizzle-orm';
|
|
9
|
-
import 'node:crypto';
|
|
5
|
+
import { CURRENCY_CODES } from '@develit-io/general-codes';
|
|
6
|
+
import { s as schema, e as PAYMENT_REQUEST_STATUSES, h as account, i as accountCredentials, o as ott } from './bank.BzDNLxB_.mjs';
|
|
7
|
+
import { defineRelations, and, not, inArray, isNull } from 'drizzle-orm';
|
|
10
8
|
import { createInsertSchema, createUpdateSchema, createSelectSchema } from 'drizzle-zod';
|
|
9
|
+
import 'node:crypto';
|
|
10
|
+
|
|
11
|
+
const relations = defineRelations(schema, (r) => ({
|
|
12
|
+
payment: {
|
|
13
|
+
batch: r.one.batch({
|
|
14
|
+
from: r.payment.batchId,
|
|
15
|
+
to: r.batch.id
|
|
16
|
+
})
|
|
17
|
+
},
|
|
18
|
+
paymentRequest: {
|
|
19
|
+
batch: r.one.batch({
|
|
20
|
+
from: r.paymentRequest.batchId,
|
|
21
|
+
to: r.batch.id
|
|
22
|
+
}),
|
|
23
|
+
account: r.one.account({
|
|
24
|
+
from: r.paymentRequest.accountId,
|
|
25
|
+
to: r.account.id
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
}));
|
|
29
|
+
|
|
30
|
+
const tables = schema;
|
|
31
|
+
|
|
32
|
+
async function signFinbricksJws({
|
|
33
|
+
privateKeyPem,
|
|
34
|
+
merchantId,
|
|
35
|
+
jwsData
|
|
36
|
+
}) {
|
|
37
|
+
const privateKey = await importPKCS8(privateKeyPem, "RS256");
|
|
38
|
+
const payload = JSON.stringify(jwsData);
|
|
39
|
+
const jws = await new SignJWT(JSON.parse(payload)).setProtectedHeader({
|
|
40
|
+
alg: "RS256",
|
|
41
|
+
kid: merchantId,
|
|
42
|
+
typ: "JWT"
|
|
43
|
+
}).sign(privateKey);
|
|
44
|
+
const [header, , signature] = jws.split(".");
|
|
45
|
+
return `${header}..${signature}`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const useFinbricksFetch = async (config, init) => {
|
|
49
|
+
const {
|
|
50
|
+
baseUrl,
|
|
51
|
+
endpoint,
|
|
52
|
+
method = "GET",
|
|
53
|
+
merchantId,
|
|
54
|
+
privateKeyPem,
|
|
55
|
+
query,
|
|
56
|
+
body,
|
|
57
|
+
correlationId,
|
|
58
|
+
psuIp = "88.205.47.1",
|
|
59
|
+
psuAgent = "Develit/BankService"
|
|
60
|
+
} = config;
|
|
61
|
+
const url = new URL(`${baseUrl}${endpoint}`);
|
|
62
|
+
if (query) {
|
|
63
|
+
for (const [k, v] of Object.entries(query)) {
|
|
64
|
+
if (v !== void 0 && v !== null)
|
|
65
|
+
url.searchParams.append(k, v.toString());
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const uriWithQuery = `${endpoint}${url.search ? `?${url.searchParams.toString()}` : ""}`;
|
|
69
|
+
const bodyString = body ? JSON.stringify(body) : "";
|
|
70
|
+
const jwsSignature = await signFinbricksJws({
|
|
71
|
+
privateKeyPem,
|
|
72
|
+
merchantId,
|
|
73
|
+
jwsData: {
|
|
74
|
+
uri: uriWithQuery,
|
|
75
|
+
body: bodyString
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
const headers = {
|
|
79
|
+
"Content-Type": "application/json",
|
|
80
|
+
"JWS-Signature": jwsSignature,
|
|
81
|
+
"PSU-IP-Address": psuIp,
|
|
82
|
+
"PSU-User-Agent": psuAgent,
|
|
83
|
+
...init?.headers
|
|
84
|
+
};
|
|
85
|
+
if (correlationId) {
|
|
86
|
+
headers["Correlation-ID"] = correlationId;
|
|
87
|
+
}
|
|
88
|
+
console.log(
|
|
89
|
+
"[Finbricks] request",
|
|
90
|
+
JSON.stringify(
|
|
91
|
+
{
|
|
92
|
+
method,
|
|
93
|
+
url: url.toString(),
|
|
94
|
+
body: body ?? null
|
|
95
|
+
},
|
|
96
|
+
null,
|
|
97
|
+
2
|
|
98
|
+
)
|
|
99
|
+
);
|
|
100
|
+
const res = await fetch(url.toString(), {
|
|
101
|
+
method,
|
|
102
|
+
headers,
|
|
103
|
+
body: method !== "GET" ? bodyString : void 0
|
|
104
|
+
});
|
|
105
|
+
if (!res.ok) {
|
|
106
|
+
const text = await res.text().catch(() => "unknown error");
|
|
107
|
+
console.error("[Finbricks] error response", {
|
|
108
|
+
status: res.status,
|
|
109
|
+
statusText: res.statusText,
|
|
110
|
+
url: url.toString(),
|
|
111
|
+
body: text
|
|
112
|
+
});
|
|
113
|
+
throw new Error(
|
|
114
|
+
`Finbricks API error: ${res.status} ${res.statusText} \u2013 ${text}`
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
const json = await res.json();
|
|
118
|
+
console.log(
|
|
119
|
+
"[Finbricks] response",
|
|
120
|
+
JSON.stringify(
|
|
121
|
+
{
|
|
122
|
+
status: res.status,
|
|
123
|
+
url: url.toString(),
|
|
124
|
+
body: json
|
|
125
|
+
},
|
|
126
|
+
null,
|
|
127
|
+
2
|
|
128
|
+
)
|
|
129
|
+
);
|
|
130
|
+
return json;
|
|
131
|
+
};
|
|
132
|
+
class FinbricksClient {
|
|
133
|
+
constructor(baseUrl, merchantId, privateKeyPem, redirectUri) {
|
|
134
|
+
this.BASE_URL = baseUrl;
|
|
135
|
+
this.MERCHANT_ID = merchantId;
|
|
136
|
+
this.PRIVATE_KEY_PEM = privateKeyPem;
|
|
137
|
+
this.REDIRECT_URI = redirectUri;
|
|
138
|
+
}
|
|
139
|
+
async request(params) {
|
|
140
|
+
return useFinbricksFetch({
|
|
141
|
+
baseUrl: this.BASE_URL,
|
|
142
|
+
merchantId: this.MERCHANT_ID,
|
|
143
|
+
privateKeyPem: this.PRIVATE_KEY_PEM,
|
|
144
|
+
...params
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const FINBRICKS_ENDPOINTS = {
|
|
150
|
+
AUTHENTICATE_V2: "/v2/auth/authenticate",
|
|
151
|
+
AUTH_TOKEN_STATUS: "/auth/token",
|
|
152
|
+
AUTH_TOKEN_REVOKE: "/auth/revoke",
|
|
153
|
+
ACCOUNT_LIST: "/account/list",
|
|
154
|
+
ACCOUNT_BALANCE: "/account/balance",
|
|
155
|
+
ACCOUNT_TRANSACTIONS: "/account/transactions",
|
|
156
|
+
TRANSACTION_INIT: "/transaction/platform/init",
|
|
157
|
+
TRANSACTION_STATUS: "/transaction/platform/status",
|
|
158
|
+
TRANSACTION_SEPA_INIT: "/transaction/platform/sepa/init",
|
|
159
|
+
TRANSACTION_FOREIGN_INIT: "/transaction/platform/foreign/init",
|
|
160
|
+
TRANSACTION_BATCH_INIT: "/transaction/platform/batchPayment/init",
|
|
161
|
+
BATCH_STATUS: "/transaction/platform/batchPayment/status",
|
|
162
|
+
BANK_INFO: "/status/bankInfo"
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const TERMINAL_STATUSES$1 = /* @__PURE__ */ new Set([
|
|
166
|
+
"SETTLED",
|
|
167
|
+
"REJECTED",
|
|
168
|
+
"CLOSED"
|
|
169
|
+
]);
|
|
170
|
+
const PENDING_STATUSES = /* @__PURE__ */ new Set([
|
|
171
|
+
"OPENED",
|
|
172
|
+
"AUTHORIZED"
|
|
173
|
+
]);
|
|
174
|
+
function isTerminalStatus(status) {
|
|
175
|
+
return TERMINAL_STATUSES$1.has(status);
|
|
176
|
+
}
|
|
177
|
+
function isPendingStatus(status) {
|
|
178
|
+
return PENDING_STATUSES.has(status);
|
|
179
|
+
}
|
|
180
|
+
function isProcessedStatus(status) {
|
|
181
|
+
return !isPendingStatus(status);
|
|
182
|
+
}
|
|
183
|
+
function hasPaymentAccountAssigned(payment) {
|
|
184
|
+
return "accountId" in payment && "connectorKey" in payment && payment.accountId !== void 0 && payment.connectorKey !== void 0;
|
|
185
|
+
}
|
|
186
|
+
function isPaymentCompleted(payment) {
|
|
187
|
+
return (payment.status === "COMPLETED" || payment.status === "BOOKED" || payment.status === "SETTLED" || payment.status === "REJECTED" || payment.status === "CLOSED") && "bankRefId" in payment && typeof payment.bankRefId === "string";
|
|
188
|
+
}
|
|
11
189
|
|
|
12
190
|
function toIncomingPayment(input) {
|
|
13
191
|
return {
|
|
@@ -239,139 +417,6 @@ class IBankConnector {
|
|
|
239
417
|
}
|
|
240
418
|
}
|
|
241
419
|
|
|
242
|
-
async function signFinbricksJws({
|
|
243
|
-
privateKeyPem,
|
|
244
|
-
merchantId,
|
|
245
|
-
jwsData
|
|
246
|
-
}) {
|
|
247
|
-
const privateKey = await importPKCS8(privateKeyPem, "RS256");
|
|
248
|
-
const payload = JSON.stringify(jwsData);
|
|
249
|
-
const jws = await new SignJWT(JSON.parse(payload)).setProtectedHeader({
|
|
250
|
-
alg: "RS256",
|
|
251
|
-
kid: merchantId,
|
|
252
|
-
typ: "JWT"
|
|
253
|
-
}).sign(privateKey);
|
|
254
|
-
const [header, , signature] = jws.split(".");
|
|
255
|
-
return `${header}..${signature}`;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
const useFinbricksFetch = async (config, init) => {
|
|
259
|
-
const {
|
|
260
|
-
baseUrl,
|
|
261
|
-
endpoint,
|
|
262
|
-
method = "GET",
|
|
263
|
-
merchantId,
|
|
264
|
-
privateKeyPem,
|
|
265
|
-
query,
|
|
266
|
-
body,
|
|
267
|
-
correlationId,
|
|
268
|
-
psuIp = "88.205.47.1",
|
|
269
|
-
psuAgent = "Develit/BankService"
|
|
270
|
-
} = config;
|
|
271
|
-
const url = new URL(`${baseUrl}${endpoint}`);
|
|
272
|
-
if (query) {
|
|
273
|
-
for (const [k, v] of Object.entries(query)) {
|
|
274
|
-
if (v !== void 0 && v !== null)
|
|
275
|
-
url.searchParams.append(k, v.toString());
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
const uriWithQuery = `${endpoint}${url.search ? `?${url.searchParams.toString()}` : ""}`;
|
|
279
|
-
const bodyString = body ? JSON.stringify(body) : "";
|
|
280
|
-
const jwsSignature = await signFinbricksJws({
|
|
281
|
-
privateKeyPem,
|
|
282
|
-
merchantId,
|
|
283
|
-
jwsData: {
|
|
284
|
-
uri: uriWithQuery,
|
|
285
|
-
body: bodyString
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
const headers = {
|
|
289
|
-
"Content-Type": "application/json",
|
|
290
|
-
"JWS-Signature": jwsSignature,
|
|
291
|
-
"PSU-IP-Address": psuIp,
|
|
292
|
-
"PSU-User-Agent": psuAgent,
|
|
293
|
-
...init?.headers
|
|
294
|
-
};
|
|
295
|
-
if (correlationId) {
|
|
296
|
-
headers["Correlation-ID"] = correlationId;
|
|
297
|
-
}
|
|
298
|
-
console.log(
|
|
299
|
-
"[Finbricks] request",
|
|
300
|
-
JSON.stringify(
|
|
301
|
-
{
|
|
302
|
-
method,
|
|
303
|
-
url: url.toString(),
|
|
304
|
-
body: body ?? null
|
|
305
|
-
},
|
|
306
|
-
null,
|
|
307
|
-
2
|
|
308
|
-
)
|
|
309
|
-
);
|
|
310
|
-
const res = await fetch(url.toString(), {
|
|
311
|
-
method,
|
|
312
|
-
headers,
|
|
313
|
-
body: method !== "GET" ? bodyString : void 0
|
|
314
|
-
});
|
|
315
|
-
if (!res.ok) {
|
|
316
|
-
const text = await res.text().catch(() => "unknown error");
|
|
317
|
-
console.error("[Finbricks] error response", {
|
|
318
|
-
status: res.status,
|
|
319
|
-
statusText: res.statusText,
|
|
320
|
-
url: url.toString(),
|
|
321
|
-
body: text
|
|
322
|
-
});
|
|
323
|
-
throw new Error(
|
|
324
|
-
`Finbricks API error: ${res.status} ${res.statusText} \u2013 ${text}`
|
|
325
|
-
);
|
|
326
|
-
}
|
|
327
|
-
const json = await res.json();
|
|
328
|
-
console.log(
|
|
329
|
-
"[Finbricks] response",
|
|
330
|
-
JSON.stringify(
|
|
331
|
-
{
|
|
332
|
-
status: res.status,
|
|
333
|
-
url: url.toString(),
|
|
334
|
-
body: json
|
|
335
|
-
},
|
|
336
|
-
null,
|
|
337
|
-
2
|
|
338
|
-
)
|
|
339
|
-
);
|
|
340
|
-
return json;
|
|
341
|
-
};
|
|
342
|
-
class FinbricksClient {
|
|
343
|
-
constructor(baseUrl, merchantId, privateKeyPem, redirectUri) {
|
|
344
|
-
this.BASE_URL = baseUrl;
|
|
345
|
-
this.MERCHANT_ID = merchantId;
|
|
346
|
-
this.PRIVATE_KEY_PEM = privateKeyPem;
|
|
347
|
-
this.REDIRECT_URI = redirectUri;
|
|
348
|
-
}
|
|
349
|
-
async request(params) {
|
|
350
|
-
return useFinbricksFetch({
|
|
351
|
-
baseUrl: this.BASE_URL,
|
|
352
|
-
merchantId: this.MERCHANT_ID,
|
|
353
|
-
privateKeyPem: this.PRIVATE_KEY_PEM,
|
|
354
|
-
...params
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
const FINBRICKS_ENDPOINTS = {
|
|
360
|
-
AUTHENTICATE_V2: "/v2/auth/authenticate",
|
|
361
|
-
AUTH_TOKEN_STATUS: "/auth/token",
|
|
362
|
-
AUTH_TOKEN_REVOKE: "/auth/revoke",
|
|
363
|
-
ACCOUNT_LIST: "/account/list",
|
|
364
|
-
ACCOUNT_BALANCE: "/account/balance",
|
|
365
|
-
ACCOUNT_TRANSACTIONS: "/account/transactions",
|
|
366
|
-
TRANSACTION_INIT: "/transaction/platform/init",
|
|
367
|
-
TRANSACTION_STATUS: "/transaction/platform/status",
|
|
368
|
-
TRANSACTION_SEPA_INIT: "/transaction/platform/sepa/init",
|
|
369
|
-
TRANSACTION_FOREIGN_INIT: "/transaction/platform/foreign/init",
|
|
370
|
-
TRANSACTION_BATCH_INIT: "/transaction/platform/batchPayment/init",
|
|
371
|
-
BATCH_STATUS: "/transaction/platform/batchPayment/status",
|
|
372
|
-
BANK_INFO: "/status/bankInfo"
|
|
373
|
-
};
|
|
374
|
-
|
|
375
420
|
const mapFinbricksStatus = (status, hasBookingDate) => {
|
|
376
421
|
switch (status) {
|
|
377
422
|
case "BOOK":
|
|
@@ -477,6 +522,26 @@ const SEPA_COUNTRIES = /* @__PURE__ */ new Set([
|
|
|
477
522
|
"GI",
|
|
478
523
|
"XK"
|
|
479
524
|
]);
|
|
525
|
+
function parseOtherIdentification(value) {
|
|
526
|
+
if (!value) return {};
|
|
527
|
+
const [first, second] = value.split("/");
|
|
528
|
+
if (!first) return {};
|
|
529
|
+
const looksLikeIban = first.length >= 15 && /^[A-Z]{2}\d{2}[A-Z0-9]+$/.test(first);
|
|
530
|
+
if (looksLikeIban) {
|
|
531
|
+
const iban = first;
|
|
532
|
+
const swiftBic = second || void 0;
|
|
533
|
+
if (iban.startsWith("CZ") && iban.length === 24) {
|
|
534
|
+
const bankCode = iban.slice(4, 8);
|
|
535
|
+
const number = iban.slice(14, 24).replace(/^0+/, "") || iban.slice(14, 24);
|
|
536
|
+
return { iban, swiftBic, bankCode, number };
|
|
537
|
+
}
|
|
538
|
+
return { iban, swiftBic };
|
|
539
|
+
}
|
|
540
|
+
return {
|
|
541
|
+
number: first,
|
|
542
|
+
bankCode: second || void 0
|
|
543
|
+
};
|
|
544
|
+
}
|
|
480
545
|
function detectPaymentType(tx, isIncoming) {
|
|
481
546
|
const related = tx.entryDetails?.transactionDetails?.relatedParties;
|
|
482
547
|
const otherParty = isIncoming ? related?.debtorAccount : related?.creditorAccount;
|
|
@@ -498,6 +563,12 @@ const mapFinbricksTransactionToPayment = (tx, account) => {
|
|
|
498
563
|
const related = tx.entryDetails?.transactionDetails?.relatedParties;
|
|
499
564
|
const endToEndId = tx.entryDetails.transactionDetails?.references?.endToEndIdentification;
|
|
500
565
|
const symbolsRegex = /^\/?VS\d+/;
|
|
566
|
+
const debtorParsed = parseOtherIdentification(
|
|
567
|
+
related?.debtorAccount?.identification?.other?.identification
|
|
568
|
+
);
|
|
569
|
+
const creditorParsed = parseOtherIdentification(
|
|
570
|
+
related?.creditorAccount?.identification?.other?.identification
|
|
571
|
+
);
|
|
501
572
|
const base = {
|
|
502
573
|
id: uuidv4(),
|
|
503
574
|
correlationId: uuidv4(),
|
|
@@ -515,13 +586,10 @@ const mapFinbricksTransactionToPayment = (tx, account) => {
|
|
|
515
586
|
),
|
|
516
587
|
creditor: {
|
|
517
588
|
holderName: related?.creditorAccount?.name || related?.creditor?.name || "Unknown",
|
|
518
|
-
iban: isIncoming ? account.iban || void 0 : related?.creditorAccount?.identification?.iban ||
|
|
519
|
-
number: isIncoming ? account.number || void 0 :
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
bankCode: isIncoming ? account.bankCode || void 0 : related?.creditorAccount?.identification?.other?.identification ? related.creditorAccount.identification.other.identification.split(
|
|
523
|
-
"/"
|
|
524
|
-
)[1] : account.bankCode || void 0,
|
|
589
|
+
iban: isIncoming ? account.iban || void 0 : related?.creditorAccount?.identification?.iban || creditorParsed.iban || void 0,
|
|
590
|
+
number: isIncoming ? account.number || void 0 : creditorParsed.number || void 0,
|
|
591
|
+
bankCode: isIncoming ? account.bankCode || void 0 : creditorParsed.bankCode || void 0,
|
|
592
|
+
swiftBic: isIncoming ? void 0 : creditorParsed.swiftBic,
|
|
525
593
|
address: related?.creditor?.postalAddress ? {
|
|
526
594
|
streetName: related.creditor.postalAddress.streetName,
|
|
527
595
|
buildingNumber: related.creditor.postalAddress.buildingNumber,
|
|
@@ -532,13 +600,10 @@ const mapFinbricksTransactionToPayment = (tx, account) => {
|
|
|
532
600
|
},
|
|
533
601
|
debtor: {
|
|
534
602
|
holderName: related?.debtorAccount?.name || related?.debtor?.name || "Unknown",
|
|
535
|
-
iban: isIncoming ? related?.debtorAccount?.identification?.iban ||
|
|
536
|
-
number: isIncoming ?
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
bankCode: isIncoming ? related?.debtorAccount?.identification?.other?.identification ? related.debtorAccount.identification.other.identification.split(
|
|
540
|
-
"/"
|
|
541
|
-
)[1] : account.bankCode || void 0 : account.bankCode || void 0,
|
|
603
|
+
iban: isIncoming ? related?.debtorAccount?.identification?.iban || debtorParsed.iban || void 0 : account.iban ?? void 0,
|
|
604
|
+
number: isIncoming ? debtorParsed.number || void 0 : account.number || void 0,
|
|
605
|
+
bankCode: isIncoming ? debtorParsed.bankCode || void 0 : account.bankCode || void 0,
|
|
606
|
+
swiftBic: isIncoming ? debtorParsed.swiftBic : void 0,
|
|
542
607
|
address: related?.debtor?.postalAddress ? {
|
|
543
608
|
streetName: related.debtor.postalAddress.streetName,
|
|
544
609
|
buildingNumber: related.debtor.postalAddress.buildingNumber,
|
|
@@ -896,7 +961,10 @@ class FinbricksConnector extends IBankConnector {
|
|
|
896
961
|
},
|
|
897
962
|
paymentIdentification: {
|
|
898
963
|
merchantTransactionId: bankRefId,
|
|
899
|
-
endToEndIdentification: this.buildEndToEndId(
|
|
964
|
+
endToEndIdentification: this.buildEndToEndId({
|
|
965
|
+
...payment,
|
|
966
|
+
id: payment.id
|
|
967
|
+
})
|
|
900
968
|
},
|
|
901
969
|
amount: payment.amount,
|
|
902
970
|
debtor: {
|
|
@@ -1078,40 +1146,6 @@ class CsobConnector extends FinbricksConnector {
|
|
|
1078
1146
|
}
|
|
1079
1147
|
}
|
|
1080
1148
|
|
|
1081
|
-
const PAYMENT_TYPES = ["SEPA", "SWIFT", "DOMESTIC", "UNKNOWN"];
|
|
1082
|
-
const CHARGE_BEARERS = ["SHA", "OUR", "BEN"];
|
|
1083
|
-
const INSTRUCTION_PRIORITIES = ["NORM", "HIGH", "INST"];
|
|
1084
|
-
const PAYMENT_REQUEST_STATUSES = [
|
|
1085
|
-
"OPENED",
|
|
1086
|
-
"AUTHORIZED",
|
|
1087
|
-
"COMPLETED",
|
|
1088
|
-
"BOOKED",
|
|
1089
|
-
"SETTLED",
|
|
1090
|
-
"REJECTED",
|
|
1091
|
-
"CLOSED"
|
|
1092
|
-
];
|
|
1093
|
-
const PAYMENT_STATUSES = [
|
|
1094
|
-
"PENDING",
|
|
1095
|
-
"PROCESSING",
|
|
1096
|
-
"BOOKED",
|
|
1097
|
-
"CANCELLED",
|
|
1098
|
-
"REJECTED",
|
|
1099
|
-
"SCHEDULED",
|
|
1100
|
-
"HOLD",
|
|
1101
|
-
"INFO"
|
|
1102
|
-
];
|
|
1103
|
-
const PAYMENT_DIRECTIONS = ["INCOMING", "OUTGOING"];
|
|
1104
|
-
const BATCH_STATUSES = [
|
|
1105
|
-
"PROCESSING",
|
|
1106
|
-
"READY_TO_SIGN",
|
|
1107
|
-
"AUTHORIZED",
|
|
1108
|
-
"COMPLETED",
|
|
1109
|
-
"FAILED"
|
|
1110
|
-
];
|
|
1111
|
-
const BATCH_MODES = ["NATIVE", "SINGLE"];
|
|
1112
|
-
const ACCOUNT_STATUSES = ["AUTHORIZED", "DISABLED", "EXPIRED"];
|
|
1113
|
-
const COUNTRY_CODES = COUNTRY_CODES_2;
|
|
1114
|
-
|
|
1115
1149
|
class AirBankConnector extends FinbricksConnector {
|
|
1116
1150
|
constructor(config) {
|
|
1117
1151
|
super("AIRBANK", config);
|
|
@@ -1946,31 +1980,6 @@ class DbuConnector extends IBankConnector {
|
|
|
1946
1980
|
}
|
|
1947
1981
|
}
|
|
1948
1982
|
|
|
1949
|
-
const TERMINAL_STATUSES$1 = /* @__PURE__ */ new Set([
|
|
1950
|
-
"SETTLED",
|
|
1951
|
-
"REJECTED",
|
|
1952
|
-
"CLOSED"
|
|
1953
|
-
]);
|
|
1954
|
-
const PENDING_STATUSES = /* @__PURE__ */ new Set([
|
|
1955
|
-
"OPENED",
|
|
1956
|
-
"AUTHORIZED"
|
|
1957
|
-
]);
|
|
1958
|
-
function isTerminalStatus(status) {
|
|
1959
|
-
return TERMINAL_STATUSES$1.has(status);
|
|
1960
|
-
}
|
|
1961
|
-
function isPendingStatus(status) {
|
|
1962
|
-
return PENDING_STATUSES.has(status);
|
|
1963
|
-
}
|
|
1964
|
-
function isProcessedStatus(status) {
|
|
1965
|
-
return !isPendingStatus(status);
|
|
1966
|
-
}
|
|
1967
|
-
function hasPaymentAccountAssigned(payment) {
|
|
1968
|
-
return "accountId" in payment && "connectorKey" in payment && payment.accountId !== void 0 && payment.connectorKey !== void 0;
|
|
1969
|
-
}
|
|
1970
|
-
function isPaymentCompleted(payment) {
|
|
1971
|
-
return (payment.status === "COMPLETED" || payment.status === "BOOKED" || payment.status === "SETTLED" || payment.status === "REJECTED" || payment.status === "CLOSED") && "bankRefId" in payment && typeof payment.bankRefId === "string";
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
1983
|
const TERMINAL_STATUSES = PAYMENT_REQUEST_STATUSES.filter(isTerminalStatus);
|
|
1975
1984
|
const getNonTerminalPaymentRequestsQuery = (db) => db.select().from(tables.paymentRequest).where(
|
|
1976
1985
|
and(
|
|
@@ -2088,7 +2097,10 @@ class ErsteConnector extends IBankConnector {
|
|
|
2088
2097
|
}
|
|
2089
2098
|
const paymentBody = {
|
|
2090
2099
|
paymentIdentification: {
|
|
2091
|
-
endToEndIdentification: this.buildEndToEndId(
|
|
2100
|
+
endToEndIdentification: this.buildEndToEndId({
|
|
2101
|
+
...payment,
|
|
2102
|
+
id: payment.id
|
|
2103
|
+
}),
|
|
2092
2104
|
instructionIdentification: payment.id
|
|
2093
2105
|
},
|
|
2094
2106
|
paymentTypeInformation: { instructionPriority: "NORM" },
|
|
@@ -2393,57 +2405,6 @@ class MockConnector extends IBankConnector {
|
|
|
2393
2405
|
}
|
|
2394
2406
|
}
|
|
2395
2407
|
|
|
2396
|
-
const CONNECTOR_KEYS = [
|
|
2397
|
-
"ERSTE",
|
|
2398
|
-
"FINBRICKS",
|
|
2399
|
-
"MOCK",
|
|
2400
|
-
"CREDITAS",
|
|
2401
|
-
"MOCK_COBS",
|
|
2402
|
-
"FIO",
|
|
2403
|
-
"MONETA",
|
|
2404
|
-
"DBU",
|
|
2405
|
-
"CSAS",
|
|
2406
|
-
"AIRBANK",
|
|
2407
|
-
"KB",
|
|
2408
|
-
"CSOB"
|
|
2409
|
-
];
|
|
2410
|
-
const CREDENTIALS_TYPES = [
|
|
2411
|
-
"AUTH_TOKEN",
|
|
2412
|
-
"REFRESH_TOKEN",
|
|
2413
|
-
"CLIENT_ID",
|
|
2414
|
-
"API_KEY"
|
|
2415
|
-
];
|
|
2416
|
-
const TOKEN_TYPES = ["ACCOUNT_AUTHORIZATION"];
|
|
2417
|
-
|
|
2418
|
-
const account = sqliteTable(
|
|
2419
|
-
"account",
|
|
2420
|
-
{
|
|
2421
|
-
...base,
|
|
2422
|
-
...bankAccount,
|
|
2423
|
-
// countryCode is temporary until bankAccount is update to include US country code
|
|
2424
|
-
countryCode: text("country_code", { enum: COUNTRY_CODES }).$type().notNull(),
|
|
2425
|
-
number: text("number").notNull(),
|
|
2426
|
-
name: text("name"),
|
|
2427
|
-
iban: text("iban").notNull(),
|
|
2428
|
-
bankCode: text("bank_code", { enum: BANK_CODES }).notNull(),
|
|
2429
|
-
connectorKey: text("connector_key", {
|
|
2430
|
-
enum: CONNECTOR_KEYS
|
|
2431
|
-
}).$type().notNull(),
|
|
2432
|
-
status: text("status", { enum: ACCOUNT_STATUSES }).$type().notNull(),
|
|
2433
|
-
bankRefId: text("bank_ref_id").notNull(),
|
|
2434
|
-
batchSizeLimit: integer("batch_size_limit").notNull().default(50),
|
|
2435
|
-
syncIntervalS: integer("sync_interval_s").notNull().default(600),
|
|
2436
|
-
lastSyncAt: integer("last_sync_at", { mode: "timestamp_ms" }),
|
|
2437
|
-
lastSyncMetadata: text("last_sync_metadata", {
|
|
2438
|
-
mode: "json"
|
|
2439
|
-
}).$type(),
|
|
2440
|
-
connectorConfig: text("connector_config", {
|
|
2441
|
-
mode: "json"
|
|
2442
|
-
}).$type()
|
|
2443
|
-
},
|
|
2444
|
-
(t) => [unique().on(t.iban)]
|
|
2445
|
-
);
|
|
2446
|
-
|
|
2447
2408
|
const accountInsertSchema = createInsertSchema(account, {
|
|
2448
2409
|
address: () => structuredAddressSchema.optional()
|
|
2449
2410
|
});
|
|
@@ -2454,193 +2415,12 @@ const accountSelectSchema = createSelectSchema(account, {
|
|
|
2454
2415
|
address: () => structuredAddressSchema.nullable()
|
|
2455
2416
|
});
|
|
2456
2417
|
|
|
2457
|
-
const accountCredentials = sqliteTable("account_credentials", {
|
|
2458
|
-
...base,
|
|
2459
|
-
accountId: text("account_id").references(() => account.id, { onDelete: "restrict", onUpdate: "cascade" }).notNull(),
|
|
2460
|
-
connectorKey: text("connector_key", {
|
|
2461
|
-
enum: CONNECTOR_KEYS
|
|
2462
|
-
}).$type().notNull(),
|
|
2463
|
-
type: text("type", {
|
|
2464
|
-
enum: CREDENTIALS_TYPES
|
|
2465
|
-
}).$type().notNull(),
|
|
2466
|
-
value: text("value").notNull(),
|
|
2467
|
-
expiresAt: integer("expires_at", { mode: "timestamp_ms" }).notNull()
|
|
2468
|
-
});
|
|
2469
|
-
|
|
2470
2418
|
const accountCredentialsInsertSchema = createInsertSchema(accountCredentials);
|
|
2471
2419
|
const accountCredentialsUpdateSchema = createUpdateSchema(accountCredentials);
|
|
2472
2420
|
const accountCredentialsSelectSchema = createSelectSchema(accountCredentials);
|
|
2473
2421
|
|
|
2474
|
-
const ott = sqliteTable("ott", {
|
|
2475
|
-
...base,
|
|
2476
|
-
oneTimeToken: text("one_time_token").notNull(),
|
|
2477
|
-
refId: text("ref_id").notNull(),
|
|
2478
|
-
tokenType: text("token_type", { enum: TOKEN_TYPES }).$type().notNull(),
|
|
2479
|
-
expiresAt: integer("expires_at", { mode: "timestamp_ms" }).notNull()
|
|
2480
|
-
});
|
|
2481
|
-
|
|
2482
2422
|
const ottInsertSchema = createInsertSchema(ott);
|
|
2483
2423
|
const ottUpdateSchema = createUpdateSchema(ott);
|
|
2484
2424
|
const ottSelectSchema = createSelectSchema(ott);
|
|
2485
2425
|
|
|
2486
|
-
|
|
2487
|
-
...base,
|
|
2488
|
-
batchPaymentInitiatedAt: integer("batch_payment_initiated_at", {
|
|
2489
|
-
mode: "timestamp_ms"
|
|
2490
|
-
}),
|
|
2491
|
-
authorizationUrls: text("authorization_urls", { mode: "json" }).$type(),
|
|
2492
|
-
accountId: text("account_id").references(() => account.id, {
|
|
2493
|
-
onDelete: "restrict",
|
|
2494
|
-
onUpdate: "cascade"
|
|
2495
|
-
}),
|
|
2496
|
-
status: text("status", { enum: BATCH_STATUSES }).$type(),
|
|
2497
|
-
statusReason: text("status_reason"),
|
|
2498
|
-
statusResponse: text("status_response", { mode: "json" }).$type(),
|
|
2499
|
-
metadata: text("metadata", { mode: "json" }).$type(),
|
|
2500
|
-
paymentType: text("payment_type", {
|
|
2501
|
-
enum: PAYMENT_TYPES
|
|
2502
|
-
}).$type(),
|
|
2503
|
-
paymentsChecksum: text("payments_checksum"),
|
|
2504
|
-
batchMode: text("batch_mode", { enum: BATCH_MODES }).$type()
|
|
2505
|
-
});
|
|
2506
|
-
|
|
2507
|
-
const payment = sqliteTable(
|
|
2508
|
-
"payment",
|
|
2509
|
-
{
|
|
2510
|
-
...base,
|
|
2511
|
-
correlationId: text("correlation_id").notNull(),
|
|
2512
|
-
refId: text("ref_id"),
|
|
2513
|
-
bankRefId: text("bank_ref_id").notNull(),
|
|
2514
|
-
accountId: text("account_id").references(() => account.id, {
|
|
2515
|
-
onDelete: "restrict",
|
|
2516
|
-
onUpdate: "cascade"
|
|
2517
|
-
}).notNull(),
|
|
2518
|
-
connectorKey: text("connector_key", { enum: CONNECTOR_KEYS }).$type().notNull(),
|
|
2519
|
-
amount: real("amount").notNull(),
|
|
2520
|
-
direction: text("direction").$type().notNull(),
|
|
2521
|
-
paymentType: text("payment_type").$type().notNull(),
|
|
2522
|
-
currency: text("currency").$type().notNull(),
|
|
2523
|
-
status: text("status", { enum: PAYMENT_STATUSES }).$type().notNull(),
|
|
2524
|
-
statusReason: text("status_reason"),
|
|
2525
|
-
batchId: text("bank_execution_batch_id"),
|
|
2526
|
-
initiatedAt: integer("initiated_at", {
|
|
2527
|
-
mode: "timestamp_ms"
|
|
2528
|
-
}),
|
|
2529
|
-
vs: text("vs"),
|
|
2530
|
-
ss: text("ss"),
|
|
2531
|
-
ks: text("ks"),
|
|
2532
|
-
message: text("message"),
|
|
2533
|
-
chargeBearer: text("charge_bearer", {
|
|
2534
|
-
enum: CHARGE_BEARERS
|
|
2535
|
-
}).$type(),
|
|
2536
|
-
instructionPriority: text("instruction_priority", {
|
|
2537
|
-
enum: INSTRUCTION_PRIORITIES
|
|
2538
|
-
}).$type(),
|
|
2539
|
-
processedAt: integer("processed_at", {
|
|
2540
|
-
mode: "timestamp_ms"
|
|
2541
|
-
}),
|
|
2542
|
-
creditor: text("creditor", { mode: "json" }).$type().notNull(),
|
|
2543
|
-
creditorIban: text("creditor_iban"),
|
|
2544
|
-
debtor: text("debtor", { mode: "json" }).$type().notNull(),
|
|
2545
|
-
debtorIban: text("debtor_iban")
|
|
2546
|
-
},
|
|
2547
|
-
(t) => [
|
|
2548
|
-
unique().on(t.connectorKey, t.accountId, t.bankRefId),
|
|
2549
|
-
index("payment_account_id_idx").on(t.accountId),
|
|
2550
|
-
index("payment_account_id_status_idx").on(t.accountId, t.status),
|
|
2551
|
-
index("payment_account_id_created_at_idx").on(t.accountId, t.createdAt),
|
|
2552
|
-
index("payment_created_at_idx").on(t.createdAt),
|
|
2553
|
-
index("payment_direction_idx").on(t.direction),
|
|
2554
|
-
index("payment_batch_id_idx").on(t.batchId),
|
|
2555
|
-
index("payment_creditor_iban_idx").on(t.creditorIban),
|
|
2556
|
-
index("payment_debtor_iban_idx").on(t.debtorIban)
|
|
2557
|
-
]
|
|
2558
|
-
);
|
|
2559
|
-
const paymentRelations = relations(payment, ({ one }) => ({
|
|
2560
|
-
batch: one(batch, { fields: [payment.batchId], references: [batch.id] })
|
|
2561
|
-
}));
|
|
2562
|
-
|
|
2563
|
-
const paymentRequest = sqliteTable(
|
|
2564
|
-
"payment_request",
|
|
2565
|
-
{
|
|
2566
|
-
...base,
|
|
2567
|
-
batchId: text("batch_id").references(() => batch.id, {
|
|
2568
|
-
onDelete: "restrict",
|
|
2569
|
-
onUpdate: "cascade"
|
|
2570
|
-
}),
|
|
2571
|
-
accountId: text("account_id").references(() => account.id, {
|
|
2572
|
-
onDelete: "restrict",
|
|
2573
|
-
onUpdate: "cascade"
|
|
2574
|
-
}).notNull(),
|
|
2575
|
-
correlationId: text("correlation_id").notNull(),
|
|
2576
|
-
refId: text("ref_id"),
|
|
2577
|
-
bankRefId: text("bank_ref_id"),
|
|
2578
|
-
connectorKey: text("connector_key", { enum: CONNECTOR_KEYS }).$type().notNull(),
|
|
2579
|
-
amount: real("amount").notNull(),
|
|
2580
|
-
paymentType: text("payment_type", { enum: PAYMENT_TYPES }).$type().notNull(),
|
|
2581
|
-
currency: text("currency").$type().notNull(),
|
|
2582
|
-
status: text("status", { enum: PAYMENT_REQUEST_STATUSES }).$type().notNull(),
|
|
2583
|
-
statusReason: text("status_reason"),
|
|
2584
|
-
authorizationUrl: text("authorization_url"),
|
|
2585
|
-
initiatedAt: integer("initiated_at", { mode: "timestamp_ms" }),
|
|
2586
|
-
processedAt: integer("processed_at", { mode: "timestamp_ms" }),
|
|
2587
|
-
vs: text("vs"),
|
|
2588
|
-
ss: text("ss"),
|
|
2589
|
-
ks: text("ks"),
|
|
2590
|
-
message: text("message"),
|
|
2591
|
-
chargeBearer: text("charge_bearer", {
|
|
2592
|
-
enum: CHARGE_BEARERS
|
|
2593
|
-
}).$type(),
|
|
2594
|
-
instructionPriority: text("instruction_priority", {
|
|
2595
|
-
enum: INSTRUCTION_PRIORITIES
|
|
2596
|
-
}).$type(),
|
|
2597
|
-
creditor: text("creditor", { mode: "json" }).$type().notNull(),
|
|
2598
|
-
creditorIban: text("creditor_iban"),
|
|
2599
|
-
debtor: text("debtor", { mode: "json" }).$type().notNull(),
|
|
2600
|
-
debtorIban: text("debtor_iban"),
|
|
2601
|
-
sendAsSinglePayment: integer("send_as_single_payment", {
|
|
2602
|
-
mode: "boolean"
|
|
2603
|
-
})
|
|
2604
|
-
},
|
|
2605
|
-
(t) => [
|
|
2606
|
-
index("payment_request_batch_id_idx").on(t.batchId),
|
|
2607
|
-
index("payment_request_account_id_idx").on(t.accountId),
|
|
2608
|
-
index("payment_request_creditor_iban_idx").on(t.creditorIban),
|
|
2609
|
-
index("payment_request_debtor_iban_idx").on(t.debtorIban),
|
|
2610
|
-
index("payment_request_status_idx").on(t.status),
|
|
2611
|
-
index("payment_request_created_at_idx").on(t.createdAt),
|
|
2612
|
-
index("payment_request_account_status_idx").on(t.accountId, t.status),
|
|
2613
|
-
index("payment_request_status_created_at_idx").on(t.status, t.createdAt),
|
|
2614
|
-
index("payment_request_account_status_created_at_idx").on(
|
|
2615
|
-
t.accountId,
|
|
2616
|
-
t.status,
|
|
2617
|
-
t.createdAt
|
|
2618
|
-
)
|
|
2619
|
-
]
|
|
2620
|
-
);
|
|
2621
|
-
const paymentRequestRelations = relations(paymentRequest, ({ one }) => ({
|
|
2622
|
-
batch: one(batch, {
|
|
2623
|
-
fields: [paymentRequest.batchId],
|
|
2624
|
-
references: [batch.id]
|
|
2625
|
-
}),
|
|
2626
|
-
account: one(account, {
|
|
2627
|
-
fields: [paymentRequest.accountId],
|
|
2628
|
-
references: [account.id]
|
|
2629
|
-
})
|
|
2630
|
-
}));
|
|
2631
|
-
|
|
2632
|
-
const schema = {
|
|
2633
|
-
__proto__: null,
|
|
2634
|
-
account: account,
|
|
2635
|
-
accountCredentials: accountCredentials,
|
|
2636
|
-
batch: batch,
|
|
2637
|
-
ott: ott,
|
|
2638
|
-
payment: payment,
|
|
2639
|
-
paymentRelations: paymentRelations,
|
|
2640
|
-
paymentRequest: paymentRequest,
|
|
2641
|
-
paymentRequestRelations: paymentRequestRelations
|
|
2642
|
-
};
|
|
2643
|
-
|
|
2644
|
-
const tables = schema;
|
|
2645
|
-
|
|
2646
|
-
export { ott as $, ACCOUNT_STATUSES as A, BATCH_MODES as B, CHARGE_BEARERS as C, DbuConnector as D, ErsteConnector as E, FINBRICKS_ENDPOINTS as F, ottSelectSchema as G, ottUpdateSchema as H, IBankConnector as I, signFinbricksJws as J, KBConnector as K, toBatchedPayment as L, MockCobsConnector as M, toBatchedPaymentFromPaymentRequest as N, toCompletedPayment as O, PAYMENT_DIRECTIONS as P, toIncomingPayment as Q, toPaymentRequestInsert as R, toPreparedPayment as S, TOKEN_TYPES as T, useFinbricksFetch as U, tables as V, initiateConnector as W, getNonTerminalPaymentRequestsQuery as X, account as Y, accountCredentials as Z, batch as _, BATCH_STATUSES as a, payment as a0, paymentRelations as a1, paymentRequest as a2, paymentRequestRelations as a3, CONNECTOR_KEYS as b, COUNTRY_CODES as c, CREDENTIALS_TYPES as d, CsobConnector as e, FinbricksClient as f, FinbricksConnector as g, INSTRUCTION_PRIORITIES as h, MockConnector as i, PAYMENT_REQUEST_STATUSES as j, PAYMENT_STATUSES as k, PAYMENT_TYPES as l, accountCredentialsInsertSchema as m, accountCredentialsSelectSchema as n, accountCredentialsUpdateSchema as o, accountInsertSchema as p, accountSelectSchema as q, accountUpdateSchema as r, assignAccount as s, dbuAccountConfigSchema as t, hasPaymentAccountAssigned as u, isPaymentCompleted as v, isPendingStatus as w, isProcessedStatus as x, isTerminalStatus as y, ottInsertSchema as z };
|
|
2426
|
+
export { useFinbricksFetch as A, tables as B, CsobConnector as C, DbuConnector as D, ErsteConnector as E, FINBRICKS_ENDPOINTS as F, relations as G, initiateConnector as H, IBankConnector as I, getNonTerminalPaymentRequestsQuery as J, KBConnector as K, MockCobsConnector as M, FinbricksClient as a, FinbricksConnector as b, MockConnector as c, accountCredentialsInsertSchema as d, accountCredentialsSelectSchema as e, accountCredentialsUpdateSchema as f, accountInsertSchema as g, accountSelectSchema as h, accountUpdateSchema as i, assignAccount as j, dbuAccountConfigSchema as k, hasPaymentAccountAssigned as l, isPaymentCompleted as m, isPendingStatus as n, isProcessedStatus as o, isTerminalStatus as p, ottInsertSchema as q, ottSelectSchema as r, ottUpdateSchema as s, signFinbricksJws as t, toBatchedPayment as u, toBatchedPaymentFromPaymentRequest as v, toCompletedPayment as w, toIncomingPayment as x, toPaymentRequestInsert as y, toPreparedPayment as z };
|