@develit-services/bank 0.0.44 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/database/schema.cjs +1 -1
- 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/database/schema.mjs +1 -1
- package/dist/export/worker.cjs +138 -569
- package/dist/export/worker.d.cts +96 -36
- package/dist/export/worker.d.mts +97 -35
- package/dist/export/worker.d.ts +96 -36
- package/dist/export/worker.mjs +130 -558
- package/dist/export/workflows.cjs +21 -0
- package/dist/export/workflows.d.cts +2 -0
- package/dist/export/workflows.d.mts +2 -0
- package/dist/export/workflows.d.ts +2 -0
- package/dist/export/workflows.mjs +15 -0
- package/dist/export/wrangler.cjs +7 -0
- package/dist/export/wrangler.d.cts +5 -0
- package/dist/export/wrangler.d.mts +5 -0
- package/dist/export/wrangler.d.ts +5 -0
- package/dist/export/wrangler.mjs +7 -0
- package/dist/shared/{bank.6WoCPIFy.mjs → bank.8lAQLFNI.mjs} +1 -1
- package/dist/shared/{bank.0KTS9nMz.d.ts → bank.BQSnGZ-3.d.cts} +33 -80
- package/dist/shared/bank.CH22Zrdv.d.cts +20 -0
- package/dist/shared/bank.CH22Zrdv.d.mts +20 -0
- package/dist/shared/bank.CH22Zrdv.d.ts +20 -0
- package/dist/shared/{bank.DmzkJQVU.d.cts → bank.CouYVuOf.d.ts} +33 -80
- package/dist/shared/{bank.BPcrbUBa.cjs → bank.DISsqBb6.cjs} +1 -1
- package/dist/shared/bank.DJ9d1yaR.mjs +269 -0
- package/dist/shared/bank.DOJ8gbXQ.cjs +278 -0
- package/dist/shared/{bank.NTyp2XAv.d.mts → bank.DW3cHO1u.d.mts} +33 -80
- package/dist/shared/{bank.BWcFhTu1.mjs → bank.RUV2HUFo.mjs} +11 -11
- package/dist/shared/{bank.BVzOzXdX.cjs → bank.UfRkUN2y.cjs} +11 -11
- package/dist/shared/{bank.CCilUVCi.d.ts → bank.mub5_S4r.d.cts} +4 -21
- package/dist/shared/{bank.CCilUVCi.d.cts → bank.mub5_S4r.d.mts} +4 -21
- package/dist/shared/{bank.CCilUVCi.d.mts → bank.mub5_S4r.d.ts} +4 -21
- package/dist/types.cjs +2 -2
- package/dist/types.d.cts +16 -9
- package/dist/types.d.mts +16 -9
- package/dist/types.d.ts +16 -9
- package/dist/types.mjs +2 -2
- package/package.json +6 -1
package/dist/export/worker.mjs
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as getPaymentsByBankRefIdsQuery, u as updatePaymentCommand, c as createPaymentCommand, a as updateAccountLastSyncCommand, b as getCredentialsByAccountId, i as initiateConnector } from '../shared/bank.DJ9d1yaR.mjs';
|
|
2
|
+
export { w as BankWorkflows } from '../shared/bank.DJ9d1yaR.mjs';
|
|
3
|
+
import { uuidv4, bankAccountMetadataSchema, workflowInstanceStatusSchema, develitWorker, createInternalError, first, action, service } from '@develit-io/backend-sdk';
|
|
2
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
3
5
|
import { drizzle } from 'drizzle-orm/d1';
|
|
4
|
-
import { t as tables,
|
|
6
|
+
import { t as tables, c as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, P as PAYMENT_TYPES, g as CONNECTOR_KEYS, B as BATCH_STATUSES, d as PAYMENT_STATUSES, e as PAYMENT_DIRECTIONS, i as accountInsertSchema, v as getPaymentDirection, M as MockConnector, F as FinbricksConnector, E as ErsteConnector } from '../shared/bank.RUV2HUFo.mjs';
|
|
5
7
|
import 'jose';
|
|
6
8
|
import { CURRENCY_CODES } from '@develit-io/general-codes';
|
|
7
9
|
import { z } from 'zod';
|
|
8
10
|
import { eq, inArray, and, sql, asc, desc, gte, lte } from 'drizzle-orm';
|
|
9
|
-
import
|
|
11
|
+
import 'cloudflare:workflows';
|
|
12
|
+
import '../shared/bank.8lAQLFNI.mjs';
|
|
10
13
|
import 'drizzle-orm/sqlite-core';
|
|
11
14
|
import 'date-fns';
|
|
12
15
|
import 'drizzle-zod';
|
|
@@ -26,18 +29,6 @@ const upsertAccountCommand = (db, { account }) => {
|
|
|
26
29
|
};
|
|
27
30
|
};
|
|
28
31
|
|
|
29
|
-
const createPaymentCommand = (db, { payment }) => {
|
|
30
|
-
return {
|
|
31
|
-
command: db.insert(tables.payment).values(payment).returning()
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const updatePaymentCommand = (db, { payment }) => {
|
|
36
|
-
return {
|
|
37
|
-
command: db.update(tables.payment).set(payment).where(eq(tables.payment.id, payment.id)).returning()
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
|
|
41
32
|
const upsertBatchCommand = (db, { batch }) => {
|
|
42
33
|
const id = batch.id || uuidv4();
|
|
43
34
|
const command = db.insert(tables.batch).values({
|
|
@@ -98,23 +89,10 @@ const deleteAccountCredentialsCommand = (db, { accountId }) => {
|
|
|
98
89
|
};
|
|
99
90
|
};
|
|
100
91
|
|
|
101
|
-
const updateAccountLastSyncCommand = (db, { lastSyncedAt, accountId }) => {
|
|
102
|
-
const command = db.update(tables.account).set({
|
|
103
|
-
lastSyncedAt
|
|
104
|
-
}).where(eq(tables.account.id, accountId)).returning();
|
|
105
|
-
return {
|
|
106
|
-
command
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
|
|
110
92
|
const getAccountByIbanQuery = async (db, { iban }) => {
|
|
111
93
|
return await db.select().from(tables.account).where(eq(tables.account.iban, iban)).get();
|
|
112
94
|
};
|
|
113
95
|
|
|
114
|
-
const getAccountByIdQuery = async (db, { accountId }) => {
|
|
115
|
-
return await db.select().from(tables.account).where(eq(tables.account.id, accountId)).get();
|
|
116
|
-
};
|
|
117
|
-
|
|
118
96
|
const getAllAccountsQuery = async (db) => {
|
|
119
97
|
const accountsWithExpiration = await db.select().from(tables.account).leftJoin(
|
|
120
98
|
tables.accountCredentials,
|
|
@@ -224,11 +202,6 @@ const getBatchesQuery = async (db, {
|
|
|
224
202
|
};
|
|
225
203
|
};
|
|
226
204
|
|
|
227
|
-
const getCredentialsByAccountId = async (db, { accountId }) => {
|
|
228
|
-
const cred = await db.select().from(tables.accountCredentials).where(eq(tables.accountCredentials.accountId, accountId)).get();
|
|
229
|
-
return cred;
|
|
230
|
-
};
|
|
231
|
-
|
|
232
205
|
const getAccountOpenBatchesQuery = async (db, { accountId }) => {
|
|
233
206
|
return await db.select().from(tables.batch).where(
|
|
234
207
|
and(
|
|
@@ -247,82 +220,6 @@ const getPaymentByRefIdQuery = async (db, { refId }) => {
|
|
|
247
220
|
return payment;
|
|
248
221
|
};
|
|
249
222
|
|
|
250
|
-
const getPaymentsByBankRefIdsQuery = async (db, { ids }) => {
|
|
251
|
-
return await db.select().from(tables.payment).where(inArray(tables.payment.bankRefId, ids));
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
class CreditasConnector extends FinbricksConnector {
|
|
255
|
-
constructor(config) {
|
|
256
|
-
super("CREDITAS", config);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
class FioConnector extends FinbricksConnector {
|
|
261
|
-
constructor(config) {
|
|
262
|
-
super("FIO", config);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
class MonetaConnector extends FinbricksConnector {
|
|
267
|
-
constructor(config) {
|
|
268
|
-
super("MONETA", config);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
const initiateConnector = ({
|
|
273
|
-
bank,
|
|
274
|
-
env,
|
|
275
|
-
connectedAccounts
|
|
276
|
-
}) => {
|
|
277
|
-
switch (bank) {
|
|
278
|
-
case "ERSTE":
|
|
279
|
-
return new ErsteConnector({
|
|
280
|
-
API_KEY: env.ERSTE_API_KEY,
|
|
281
|
-
CLIENT_ID: env.ERSTE_CLIENT_ID,
|
|
282
|
-
CLIENT_SECRET: env.ERSTE_CLIENT_SECRET,
|
|
283
|
-
REDIRECT_URI: env.REDIRECT_URI,
|
|
284
|
-
AUTH_URI: env.ERSTE_AUTH_URI,
|
|
285
|
-
PAYMENTS_URI: env.ERSTE_PAYMENTS_URI,
|
|
286
|
-
ACCOUNTS_URI: env.ERSTE_ACCOUNTS_URI,
|
|
287
|
-
connectedAccounts
|
|
288
|
-
});
|
|
289
|
-
case "CREDITAS":
|
|
290
|
-
return new CreditasConnector({
|
|
291
|
-
BASE_URI: env.FINBRICKS_BASE_URI,
|
|
292
|
-
MERCHANT_ID: env.FINBRICKS_MERCHANT_ID,
|
|
293
|
-
PRIVATE_KEY_PEM: env.FINBRICKS_PRIVATE_KEY_PEM,
|
|
294
|
-
REDIRECT_URI: env.REDIRECT_URI,
|
|
295
|
-
connectedAccounts
|
|
296
|
-
});
|
|
297
|
-
case "MOCK_COBS":
|
|
298
|
-
return new MockCobsConnector({
|
|
299
|
-
BASE_URI: env.FINBRICKS_BASE_URI,
|
|
300
|
-
MERCHANT_ID: env.FINBRICKS_MERCHANT_ID,
|
|
301
|
-
PRIVATE_KEY_PEM: env.FINBRICKS_PRIVATE_KEY_PEM,
|
|
302
|
-
REDIRECT_URI: env.REDIRECT_URI,
|
|
303
|
-
connectedAccounts
|
|
304
|
-
});
|
|
305
|
-
case "FIO":
|
|
306
|
-
return new FioConnector({
|
|
307
|
-
BASE_URI: env.FINBRICKS_BASE_URI,
|
|
308
|
-
MERCHANT_ID: env.FINBRICKS_MERCHANT_ID,
|
|
309
|
-
PRIVATE_KEY_PEM: env.FINBRICKS_PRIVATE_KEY_PEM,
|
|
310
|
-
REDIRECT_URI: env.REDIRECT_URI,
|
|
311
|
-
connectedAccounts
|
|
312
|
-
});
|
|
313
|
-
case "MONETA":
|
|
314
|
-
return new MonetaConnector({
|
|
315
|
-
BASE_URI: env.FINBRICKS_BASE_URI,
|
|
316
|
-
MERCHANT_ID: env.FINBRICKS_MERCHANT_ID,
|
|
317
|
-
PRIVATE_KEY_PEM: env.FINBRICKS_PRIVATE_KEY_PEM,
|
|
318
|
-
REDIRECT_URI: env.REDIRECT_URI,
|
|
319
|
-
connectedAccounts
|
|
320
|
-
});
|
|
321
|
-
default:
|
|
322
|
-
return new MockConnector();
|
|
323
|
-
}
|
|
324
|
-
};
|
|
325
|
-
|
|
326
223
|
const seperateSupportedPayments = (mappedPayments, accounts) => {
|
|
327
224
|
const [supportedPayments, unsupportedPayments] = mappedPayments.reduce(
|
|
328
225
|
([valid, invalid], payment) => {
|
|
@@ -436,6 +333,26 @@ const getPaymentsInputSchema = z.object({
|
|
|
436
333
|
const syncAccountInputSchema = z.object({
|
|
437
334
|
accountId: z.uuid()
|
|
438
335
|
});
|
|
336
|
+
z.object({
|
|
337
|
+
instanceId: z.string(),
|
|
338
|
+
details: workflowInstanceStatusSchema
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
const syncAccountStatusInputSchema = z.object({
|
|
342
|
+
accountId: z.uuid()
|
|
343
|
+
});
|
|
344
|
+
z.object({
|
|
345
|
+
instanceId: z.string(),
|
|
346
|
+
details: workflowInstanceStatusSchema
|
|
347
|
+
});
|
|
348
|
+
|
|
349
|
+
const syncAccountRestartInputSchema = z.object({
|
|
350
|
+
accountId: z.uuid()
|
|
351
|
+
});
|
|
352
|
+
z.object({
|
|
353
|
+
instanceId: z.string(),
|
|
354
|
+
details: workflowInstanceStatusSchema
|
|
355
|
+
});
|
|
439
356
|
|
|
440
357
|
const updateAccountInputSchema = z.object({
|
|
441
358
|
account: accountInsertSchema
|
|
@@ -471,13 +388,21 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
471
388
|
for (const account of accounts.filter(
|
|
472
389
|
(acc) => acc.connectorKey === connectorKey
|
|
473
390
|
)) {
|
|
391
|
+
if (!account.lastSyncedAt) {
|
|
392
|
+
this.log({
|
|
393
|
+
message: `Skipping account ${account.id} as it has no lastSyncedAt date.`
|
|
394
|
+
});
|
|
395
|
+
continue;
|
|
396
|
+
}
|
|
474
397
|
const payments = await this.bankConnector.getAllAccountPayments({
|
|
475
398
|
db: this.db,
|
|
476
|
-
|
|
477
|
-
account
|
|
399
|
+
environment: this.env.ENVIRONMENT,
|
|
400
|
+
account,
|
|
401
|
+
filter: {
|
|
402
|
+
dateFrom: account.lastSyncedAt
|
|
403
|
+
}
|
|
478
404
|
});
|
|
479
405
|
if (!payments || payments.length === 0) continue;
|
|
480
|
-
this.log(payments);
|
|
481
406
|
payments.forEach((payment) => {
|
|
482
407
|
payment.direction = getPaymentDirection(payment, account.iban);
|
|
483
408
|
});
|
|
@@ -492,16 +417,42 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
492
417
|
ids: bankRefIds
|
|
493
418
|
}
|
|
494
419
|
);
|
|
420
|
+
const eventsToPush = [];
|
|
495
421
|
const paymentsCommands = allFetchedPayments.map((payment) => {
|
|
496
422
|
const isAlreadyExisting = alreadyExistingPayments.some(
|
|
497
423
|
(existingPayment) => existingPayment.bankRefId === payment.bankRefId
|
|
498
424
|
);
|
|
499
|
-
if (isAlreadyExisting)
|
|
425
|
+
if (isAlreadyExisting) {
|
|
426
|
+
eventsToPush.push({
|
|
427
|
+
eventType: "BANK_PAYMENT",
|
|
428
|
+
eventSignal: "paymentUpdated",
|
|
429
|
+
bankPayment: payment,
|
|
430
|
+
metadata: {
|
|
431
|
+
correlationId: payment.correlationId,
|
|
432
|
+
entityId: payment.id,
|
|
433
|
+
idempotencySuffix: payment.status,
|
|
434
|
+
timestamp: (/* @__PURE__ */ new Date()).toDateString()
|
|
435
|
+
}
|
|
436
|
+
});
|
|
500
437
|
return updatePaymentCommand(this.db, { payment }).command;
|
|
438
|
+
}
|
|
439
|
+
eventsToPush.push({
|
|
440
|
+
eventType: "BANK_PAYMENT",
|
|
441
|
+
eventSignal: "paymentCreated",
|
|
442
|
+
bankPayment: payment,
|
|
443
|
+
metadata: {
|
|
444
|
+
correlationId: payment.correlationId,
|
|
445
|
+
entityId: payment.id,
|
|
446
|
+
timestamp: (/* @__PURE__ */ new Date()).toDateString()
|
|
447
|
+
}
|
|
448
|
+
});
|
|
501
449
|
return createPaymentCommand(this.db, { payment }).command;
|
|
502
450
|
});
|
|
503
451
|
await this.db.batch([paymentsCommands[0], ...paymentsCommands.slice(1)]);
|
|
504
|
-
|
|
452
|
+
await this.pushToQueue(
|
|
453
|
+
this.env.QUEUE_BUS_QUEUE,
|
|
454
|
+
eventsToPush
|
|
455
|
+
);
|
|
505
456
|
for (const account of accounts) {
|
|
506
457
|
const paymentsForAccount = allFetchedPayments.filter(
|
|
507
458
|
(payment) => (payment.direction === "OUTGOING" ? payment.debtorIban : payment.creditorIban) === account.iban
|
|
@@ -522,19 +473,6 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
522
473
|
}).command.execute();
|
|
523
474
|
}
|
|
524
475
|
}
|
|
525
|
-
await this.pushToQueue(
|
|
526
|
-
this.env.QUEUE_BUS_QUEUE,
|
|
527
|
-
allFetchedPayments.map((payment) => ({
|
|
528
|
-
eventType: "BANK_PAYMENT",
|
|
529
|
-
eventSignal: "created",
|
|
530
|
-
bankPayment: payment,
|
|
531
|
-
metadata: {
|
|
532
|
-
correlationId: uuidv4(),
|
|
533
|
-
entityId: payment.id,
|
|
534
|
-
timestamp: (/* @__PURE__ */ new Date()).toDateString()
|
|
535
|
-
}
|
|
536
|
-
}))
|
|
537
|
-
);
|
|
538
476
|
}
|
|
539
477
|
async _initiateBankConnector({
|
|
540
478
|
connectorKey,
|
|
@@ -600,18 +538,45 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
600
538
|
async syncAccount(input) {
|
|
601
539
|
return this.handleAction(
|
|
602
540
|
{ data: input, schema: syncAccountInputSchema },
|
|
603
|
-
{ successMessage: "Account
|
|
541
|
+
{ successMessage: "Account sync workflow started" },
|
|
604
542
|
async ({ accountId }) => {
|
|
605
|
-
const
|
|
606
|
-
accountId
|
|
543
|
+
const instance = await this.env.SYNC_ACCOUNT_PAYMENTS_WORKFLOW.create({
|
|
544
|
+
id: accountId,
|
|
545
|
+
params: {
|
|
546
|
+
accountId
|
|
547
|
+
}
|
|
607
548
|
});
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
549
|
+
return {
|
|
550
|
+
instanceId: instance.id,
|
|
551
|
+
details: await instance.status()
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
);
|
|
555
|
+
}
|
|
556
|
+
async syncAccountStatus(input) {
|
|
557
|
+
return this.handleAction(
|
|
558
|
+
{ data: input, schema: syncAccountStatusInputSchema },
|
|
559
|
+
{ successMessage: "Account sync workflow status retrieved" },
|
|
560
|
+
async ({ accountId }) => {
|
|
561
|
+
const instance = await this.env.SYNC_ACCOUNT_PAYMENTS_WORKFLOW.get(accountId);
|
|
562
|
+
return {
|
|
563
|
+
instanceId: instance.id,
|
|
564
|
+
details: await instance.status()
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
);
|
|
568
|
+
}
|
|
569
|
+
async syncAccountRestart(input) {
|
|
570
|
+
return this.handleAction(
|
|
571
|
+
{ data: input, schema: syncAccountRestartInputSchema },
|
|
572
|
+
{ successMessage: "Account sync workflow restarted" },
|
|
573
|
+
async ({ accountId }) => {
|
|
574
|
+
const instance = await this.env.SYNC_ACCOUNT_PAYMENTS_WORKFLOW.get(accountId);
|
|
575
|
+
await instance.restart();
|
|
576
|
+
return {
|
|
577
|
+
instanceId: instance.id,
|
|
578
|
+
details: await instance.status()
|
|
579
|
+
};
|
|
615
580
|
}
|
|
616
581
|
);
|
|
617
582
|
}
|
|
@@ -737,7 +702,7 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
737
702
|
this.env.QUEUE_BUS_QUEUE,
|
|
738
703
|
unsupportedPayments.map((unsupported) => ({
|
|
739
704
|
eventType: "BANK_PAYMENT",
|
|
740
|
-
eventSignal: "
|
|
705
|
+
eventSignal: "paymentFailed",
|
|
741
706
|
bankPayment: {
|
|
742
707
|
...unsupported,
|
|
743
708
|
status: "FAILED",
|
|
@@ -1070,7 +1035,7 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
1070
1035
|
this.logQueuePush({ payment, isPaymentExecuted: true });
|
|
1071
1036
|
await this.pushToQueue(this.env.QUEUE_BUS_QUEUE, {
|
|
1072
1037
|
eventType: "BANK_PAYMENT",
|
|
1073
|
-
eventSignal: "
|
|
1038
|
+
eventSignal: "paymentCompleted",
|
|
1074
1039
|
bankPayment: createdPayment,
|
|
1075
1040
|
metadata: {
|
|
1076
1041
|
correlationId: createdPayment.correlationId,
|
|
@@ -1119,7 +1084,31 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
1119
1084
|
return this.handleAction(
|
|
1120
1085
|
null,
|
|
1121
1086
|
{ successMessage: "Bank accounts retrieved successfully" },
|
|
1122
|
-
async () =>
|
|
1087
|
+
async () => {
|
|
1088
|
+
const accounts = await this._getAccounts();
|
|
1089
|
+
const accountsWithWorkflows = await Promise.all(
|
|
1090
|
+
accounts.map(async (a) => {
|
|
1091
|
+
let status;
|
|
1092
|
+
try {
|
|
1093
|
+
const instance = await this.env.SYNC_ACCOUNT_PAYMENTS_WORKFLOW.get(a.id);
|
|
1094
|
+
status = await instance.status();
|
|
1095
|
+
} catch (_) {
|
|
1096
|
+
status = null;
|
|
1097
|
+
}
|
|
1098
|
+
return {
|
|
1099
|
+
...a,
|
|
1100
|
+
workflow: status ? {
|
|
1101
|
+
instanceId: a.id,
|
|
1102
|
+
details: status
|
|
1103
|
+
} : null
|
|
1104
|
+
};
|
|
1105
|
+
})
|
|
1106
|
+
);
|
|
1107
|
+
return {
|
|
1108
|
+
accounts: accountsWithWorkflows,
|
|
1109
|
+
totalCount: accounts.length
|
|
1110
|
+
};
|
|
1111
|
+
}
|
|
1123
1112
|
);
|
|
1124
1113
|
}
|
|
1125
1114
|
async updateAccount(input) {
|
|
@@ -1215,421 +1204,4 @@ function defineBankService({
|
|
|
1215
1204
|
};
|
|
1216
1205
|
}
|
|
1217
1206
|
|
|
1218
|
-
|
|
1219
|
-
config: {
|
|
1220
|
-
allowedProviders: []
|
|
1221
|
-
// {
|
|
1222
|
-
// connectorKey: 'MOCK_COBS',
|
|
1223
|
-
// id: 'staging-czk',
|
|
1224
|
-
// identification: {
|
|
1225
|
-
// number: '1234567890',
|
|
1226
|
-
// bankCode: '5051',
|
|
1227
|
-
// iban: 'CZ0350510000000000000449',
|
|
1228
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1229
|
-
// },
|
|
1230
|
-
// fallbackLastSync: monthAgo,
|
|
1231
|
-
// currency: 'CZK',
|
|
1232
|
-
// production: false,
|
|
1233
|
-
// },
|
|
1234
|
-
// {
|
|
1235
|
-
// connectorKey: 'MOCK_COBS',
|
|
1236
|
-
// id: 'staging-eur',
|
|
1237
|
-
// identification: {
|
|
1238
|
-
// number: '2345678901',
|
|
1239
|
-
// bankCode: '5051',
|
|
1240
|
-
// iban: 'CZ0750510000000000000668',
|
|
1241
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1242
|
-
// },
|
|
1243
|
-
// fallbackLastSync: monthAgo,
|
|
1244
|
-
// currency: 'EUR',
|
|
1245
|
-
// production: false,
|
|
1246
|
-
// },
|
|
1247
|
-
// {
|
|
1248
|
-
// connectorKey: 'FIO',
|
|
1249
|
-
// id: 'kleinpetr-test',
|
|
1250
|
-
// identification: {
|
|
1251
|
-
// number: '2502130437',
|
|
1252
|
-
// bankCode: '2010',
|
|
1253
|
-
// iban: 'CZ8520100000002502130437',
|
|
1254
|
-
// holderName: 'Petr Klein',
|
|
1255
|
-
// },
|
|
1256
|
-
// fallbackLastSync: monthAgo,
|
|
1257
|
-
// currency: 'CZK',
|
|
1258
|
-
// production: true,
|
|
1259
|
-
// },
|
|
1260
|
-
// {
|
|
1261
|
-
// connectorKey: 'MOCK',
|
|
1262
|
-
// id: 'id-test',
|
|
1263
|
-
// identification: {
|
|
1264
|
-
// number: '777777777',
|
|
1265
|
-
// bankCode: '0800',
|
|
1266
|
-
// iban: 'PL0000000000002444430437',
|
|
1267
|
-
// holderName: 'Test Test',
|
|
1268
|
-
// },
|
|
1269
|
-
// fallbackLastSync: monthAgo,
|
|
1270
|
-
// currency: 'PLN',
|
|
1271
|
-
// production: false,
|
|
1272
|
-
// },
|
|
1273
|
-
// {
|
|
1274
|
-
// connectorKey: 'MOCK_COBS',
|
|
1275
|
-
// id: 'staging-usd',
|
|
1276
|
-
// identification: {
|
|
1277
|
-
// iban: 'CZ3456789012345678901234',
|
|
1278
|
-
// accountNumberWithBankCode: '3456789012/3456',
|
|
1279
|
-
// },
|
|
1280
|
-
// currency: 'USD',
|
|
1281
|
-
// bankCode: '0800',
|
|
1282
|
-
// accountNumber: '3456789012',
|
|
1283
|
-
// production: false,
|
|
1284
|
-
// },
|
|
1285
|
-
// ],
|
|
1286
|
-
// productionAccounts: [
|
|
1287
|
-
// // Banka CREDITAS (2250)
|
|
1288
|
-
// {
|
|
1289
|
-
// connectorKey: 'CREDITAS',
|
|
1290
|
-
// id: '2250-CZK',
|
|
1291
|
-
// identification: {
|
|
1292
|
-
// number: '100602391',
|
|
1293
|
-
// bankCode: '2250',
|
|
1294
|
-
// iban: 'CZ5122500000000100602391',
|
|
1295
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1296
|
-
// },
|
|
1297
|
-
// fallbackLastSync: monthAgo,
|
|
1298
|
-
// currency: 'CZK',
|
|
1299
|
-
// production: true,
|
|
1300
|
-
// },
|
|
1301
|
-
// {
|
|
1302
|
-
// connectorKey: 'CREDITAS',
|
|
1303
|
-
// id: '2250-EUR',
|
|
1304
|
-
// identification: {
|
|
1305
|
-
// number: '100602404',
|
|
1306
|
-
// bankCode: '2250',
|
|
1307
|
-
// iban: 'CZ8822500000000100602404',
|
|
1308
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1309
|
-
// },
|
|
1310
|
-
// fallbackLastSync: monthAgo,
|
|
1311
|
-
// currency: 'EUR',
|
|
1312
|
-
// production: true,
|
|
1313
|
-
// },
|
|
1314
|
-
// {
|
|
1315
|
-
// connectorKey: 'CREDITAS',
|
|
1316
|
-
// id: '2250-USD',
|
|
1317
|
-
// identification: {
|
|
1318
|
-
// number: '100602412',
|
|
1319
|
-
// bankCode: '2250',
|
|
1320
|
-
// iban: 'CZ6622500000000100602412',
|
|
1321
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1322
|
-
// },
|
|
1323
|
-
// fallbackLastSync: monthAgo,
|
|
1324
|
-
// currency: 'USD',
|
|
1325
|
-
// production: true,
|
|
1326
|
-
// },
|
|
1327
|
-
// {
|
|
1328
|
-
// connectorKey: 'CREDITAS',
|
|
1329
|
-
// id: '2250-GBP',
|
|
1330
|
-
// identification: {
|
|
1331
|
-
// number: '100602420',
|
|
1332
|
-
// bankCode: '2250',
|
|
1333
|
-
// iban: 'CZ4422500000000100602420',
|
|
1334
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1335
|
-
// },
|
|
1336
|
-
// fallbackLastSync: monthAgo,
|
|
1337
|
-
// currency: 'GBP',
|
|
1338
|
-
// production: true,
|
|
1339
|
-
// },
|
|
1340
|
-
// {
|
|
1341
|
-
// connectorKey: 'CREDITAS',
|
|
1342
|
-
// id: '2250-CHF',
|
|
1343
|
-
// identification: {
|
|
1344
|
-
// number: '100602439',
|
|
1345
|
-
// bankCode: '2250',
|
|
1346
|
-
// iban: 'CZ1622500000000100602439',
|
|
1347
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1348
|
-
// },
|
|
1349
|
-
// fallbackLastSync: monthAgo,
|
|
1350
|
-
// currency: 'CHF',
|
|
1351
|
-
// production: true,
|
|
1352
|
-
// },
|
|
1353
|
-
// {
|
|
1354
|
-
// connectorKey: 'CREDITAS',
|
|
1355
|
-
// id: '2250-PLN',
|
|
1356
|
-
// identification: {
|
|
1357
|
-
// number: '100602447',
|
|
1358
|
-
// bankCode: '2250',
|
|
1359
|
-
// iban: 'CZ9122500000000100602447',
|
|
1360
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1361
|
-
// },
|
|
1362
|
-
// fallbackLastSync: monthAgo,
|
|
1363
|
-
// currency: 'PLN',
|
|
1364
|
-
// production: true,
|
|
1365
|
-
// },
|
|
1366
|
-
// // Fio banka (2010)
|
|
1367
|
-
// {
|
|
1368
|
-
// connectorKey: 'FINBRICKS',
|
|
1369
|
-
// id: '2010-CZK',
|
|
1370
|
-
// identification: {
|
|
1371
|
-
// number: '2500845869',
|
|
1372
|
-
// bankCode: '2010',
|
|
1373
|
-
// iban: 'CZ0420100000002500845869',
|
|
1374
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1375
|
-
// },
|
|
1376
|
-
// fallbackLastSync: monthAgo,
|
|
1377
|
-
// currency: 'CZK',
|
|
1378
|
-
// production: true,
|
|
1379
|
-
// },
|
|
1380
|
-
// {
|
|
1381
|
-
// connectorKey: 'FINBRICKS',
|
|
1382
|
-
// id: '2010-EUR',
|
|
1383
|
-
// identification: {
|
|
1384
|
-
// number: '2600884128',
|
|
1385
|
-
// bankCode: '2010',
|
|
1386
|
-
// iban: 'CZ0820100000002600884128',
|
|
1387
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1388
|
-
// },
|
|
1389
|
-
// fallbackLastSync: monthAgo,
|
|
1390
|
-
// currency: 'EUR',
|
|
1391
|
-
// production: true,
|
|
1392
|
-
// },
|
|
1393
|
-
// {
|
|
1394
|
-
// connectorKey: 'FINBRICKS',
|
|
1395
|
-
// id: '2010-USD',
|
|
1396
|
-
// identification: {
|
|
1397
|
-
// number: '2700884133',
|
|
1398
|
-
// bankCode: '2010',
|
|
1399
|
-
// iban: 'CZ1420100000002700884133',
|
|
1400
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1401
|
-
// },
|
|
1402
|
-
// fallbackLastSync: monthAgo,
|
|
1403
|
-
// currency: 'USD',
|
|
1404
|
-
// production: true,
|
|
1405
|
-
// },
|
|
1406
|
-
// {
|
|
1407
|
-
// connectorKey: 'FINBRICKS',
|
|
1408
|
-
// id: '2010-CHF',
|
|
1409
|
-
// identification: {
|
|
1410
|
-
// number: '2401098351',
|
|
1411
|
-
// bankCode: '2010',
|
|
1412
|
-
// iban: 'CZ0920100000002401098351',
|
|
1413
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1414
|
-
// },
|
|
1415
|
-
// fallbackLastSync: monthAgo,
|
|
1416
|
-
// currency: 'CHF',
|
|
1417
|
-
// production: true,
|
|
1418
|
-
// },
|
|
1419
|
-
// {
|
|
1420
|
-
// connectorKey: 'FINBRICKS',
|
|
1421
|
-
// id: '2010-GBP',
|
|
1422
|
-
// identification: {
|
|
1423
|
-
// number: '2400884131',
|
|
1424
|
-
// bankCode: '2010',
|
|
1425
|
-
// iban: 'CZ3320100000002400884131',
|
|
1426
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1427
|
-
// },
|
|
1428
|
-
// fallbackLastSync: monthAgo,
|
|
1429
|
-
// currency: 'GBP',
|
|
1430
|
-
// production: true,
|
|
1431
|
-
// },
|
|
1432
|
-
// {
|
|
1433
|
-
// connectorKey: 'FINBRICKS',
|
|
1434
|
-
// id: '2010-PLN',
|
|
1435
|
-
// identification: {
|
|
1436
|
-
// number: '2701098353',
|
|
1437
|
-
// bankCode: '2010',
|
|
1438
|
-
// iban: 'CZ8720100000002701098353',
|
|
1439
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1440
|
-
// },
|
|
1441
|
-
// fallbackLastSync: monthAgo,
|
|
1442
|
-
// currency: 'PLN',
|
|
1443
|
-
// production: true,
|
|
1444
|
-
// },
|
|
1445
|
-
// {
|
|
1446
|
-
// connectorKey: 'FINBRICKS',
|
|
1447
|
-
// id: '2010-CAD',
|
|
1448
|
-
// identification: {
|
|
1449
|
-
// number: '2701478102',
|
|
1450
|
-
// bankCode: '2010',
|
|
1451
|
-
// iban: 'CZ5520100000002701478102',
|
|
1452
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1453
|
-
// },
|
|
1454
|
-
// fallbackLastSync: monthAgo,
|
|
1455
|
-
// currency: 'CAD',
|
|
1456
|
-
// production: true,
|
|
1457
|
-
// },
|
|
1458
|
-
// // Komerční banka (0100)
|
|
1459
|
-
// {
|
|
1460
|
-
// connectorKey: 'FINBRICKS',
|
|
1461
|
-
// id: '0100-CZK',
|
|
1462
|
-
// identification: {
|
|
1463
|
-
// number: '115-1483630297',
|
|
1464
|
-
// bankCode: '0100',
|
|
1465
|
-
// iban: 'CZ5901000001151483630297',
|
|
1466
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1467
|
-
// },
|
|
1468
|
-
// fallbackLastSync: monthAgo,
|
|
1469
|
-
// currency: 'CZK',
|
|
1470
|
-
// production: true,
|
|
1471
|
-
// },
|
|
1472
|
-
// {
|
|
1473
|
-
// connectorKey: 'FINBRICKS',
|
|
1474
|
-
// id: '0100-EUR',
|
|
1475
|
-
// identification: {
|
|
1476
|
-
// number: '115-1484940297',
|
|
1477
|
-
// bankCode: '0100',
|
|
1478
|
-
// iban: 'CZ4201000001151484940297',
|
|
1479
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1480
|
-
// },
|
|
1481
|
-
// fallbackLastSync: monthAgo,
|
|
1482
|
-
// currency: 'EUR',
|
|
1483
|
-
// production: true,
|
|
1484
|
-
// },
|
|
1485
|
-
// {
|
|
1486
|
-
// connectorKey: 'FINBRICKS',
|
|
1487
|
-
// id: '0100-USD',
|
|
1488
|
-
// identification: {
|
|
1489
|
-
// number: '115-1483960237',
|
|
1490
|
-
// bankCode: '0100',
|
|
1491
|
-
// iban: 'CZ6201000001151483960237',
|
|
1492
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1493
|
-
// },
|
|
1494
|
-
// fallbackLastSync: monthAgo,
|
|
1495
|
-
// currency: 'USD',
|
|
1496
|
-
// production: true,
|
|
1497
|
-
// },
|
|
1498
|
-
// {
|
|
1499
|
-
// connectorKey: 'FINBRICKS',
|
|
1500
|
-
// id: '0100-PLN',
|
|
1501
|
-
// identification: {
|
|
1502
|
-
// number: '115-6674290267',
|
|
1503
|
-
// bankCode: '0100',
|
|
1504
|
-
// iban: 'CZ3501000001156674290267',
|
|
1505
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1506
|
-
// },
|
|
1507
|
-
// fallbackLastSync: monthAgo,
|
|
1508
|
-
// currency: 'PLN',
|
|
1509
|
-
// production: true,
|
|
1510
|
-
// },
|
|
1511
|
-
// {
|
|
1512
|
-
// connectorKey: 'FINBRICKS',
|
|
1513
|
-
// id: '0100-SEK',
|
|
1514
|
-
// identification: {
|
|
1515
|
-
// number: '115-9578110207',
|
|
1516
|
-
// bankCode: '0100',
|
|
1517
|
-
// iban: 'CZ2401000001159578110207',
|
|
1518
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1519
|
-
// },
|
|
1520
|
-
// fallbackLastSync: monthAgo,
|
|
1521
|
-
// currency: 'SEK',
|
|
1522
|
-
// production: true,
|
|
1523
|
-
// },
|
|
1524
|
-
// // Česká spořitelna (0800)
|
|
1525
|
-
// {
|
|
1526
|
-
// connectorKey: 'ERSTE',
|
|
1527
|
-
// id: '0800-CZK',
|
|
1528
|
-
// identification: {
|
|
1529
|
-
// number: '4413926379',
|
|
1530
|
-
// bankCode: '0800',
|
|
1531
|
-
// iban: 'CZ7908000000004413926379',
|
|
1532
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1533
|
-
// },
|
|
1534
|
-
// fallbackLastSync: monthAgo,
|
|
1535
|
-
// currency: 'CZK',
|
|
1536
|
-
// production: true,
|
|
1537
|
-
// },
|
|
1538
|
-
// {
|
|
1539
|
-
// connectorKey: 'ERSTE',
|
|
1540
|
-
// id: '0800-EUR',
|
|
1541
|
-
// identification: {
|
|
1542
|
-
// number: '1966646293',
|
|
1543
|
-
// bankCode: '0800',
|
|
1544
|
-
// iban: 'CZ2308000000001966646293',
|
|
1545
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1546
|
-
// },
|
|
1547
|
-
// fallbackLastSync: monthAgo,
|
|
1548
|
-
// currency: 'EUR',
|
|
1549
|
-
// production: true,
|
|
1550
|
-
// },
|
|
1551
|
-
// {
|
|
1552
|
-
// connectorKey: 'ERSTE',
|
|
1553
|
-
// id: '0800-USD',
|
|
1554
|
-
// identification: {
|
|
1555
|
-
// number: '1978982243',
|
|
1556
|
-
// bankCode: '0800',
|
|
1557
|
-
// iban: 'CZ1908000000001978982243',
|
|
1558
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1559
|
-
// },
|
|
1560
|
-
// fallbackLastSync: monthAgo,
|
|
1561
|
-
// currency: 'USD',
|
|
1562
|
-
// production: true,
|
|
1563
|
-
// },
|
|
1564
|
-
// {
|
|
1565
|
-
// connectorKey: 'ERSTE',
|
|
1566
|
-
// id: '0800-HUF',
|
|
1567
|
-
// identification: {
|
|
1568
|
-
// number: '13461252',
|
|
1569
|
-
// bankCode: '0800',
|
|
1570
|
-
// iban: 'CZ1908000000000013461252',
|
|
1571
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1572
|
-
// },
|
|
1573
|
-
// fallbackLastSync: monthAgo,
|
|
1574
|
-
// currency: 'HUF',
|
|
1575
|
-
// production: true,
|
|
1576
|
-
// },
|
|
1577
|
-
// // MONETA Money Bank (0600)
|
|
1578
|
-
// {
|
|
1579
|
-
// connectorKey: 'FINBRICKS',
|
|
1580
|
-
// id: '0600-CZK',
|
|
1581
|
-
// identification: {
|
|
1582
|
-
// number: '224252186',
|
|
1583
|
-
// bankCode: '0600',
|
|
1584
|
-
// iban: 'CZ5906000000000224252186',
|
|
1585
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1586
|
-
// },
|
|
1587
|
-
// fallbackLastSync: monthAgo,
|
|
1588
|
-
// currency: 'CZK',
|
|
1589
|
-
// production: true,
|
|
1590
|
-
// },
|
|
1591
|
-
// {
|
|
1592
|
-
// connectorKey: 'FINBRICKS',
|
|
1593
|
-
// id: '0600-EUR',
|
|
1594
|
-
// identification: {
|
|
1595
|
-
// number: '224252231',
|
|
1596
|
-
// bankCode: '0600',
|
|
1597
|
-
// iban: 'CZ0806000000000224252231',
|
|
1598
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1599
|
-
// },
|
|
1600
|
-
// fallbackLastSync: monthAgo,
|
|
1601
|
-
// currency: 'EUR',
|
|
1602
|
-
// production: true,
|
|
1603
|
-
// },
|
|
1604
|
-
// {
|
|
1605
|
-
// connectorKey: 'FINBRICKS',
|
|
1606
|
-
// id: '0600-USD',
|
|
1607
|
-
// identification: {
|
|
1608
|
-
// number: '224252290',
|
|
1609
|
-
// bankCode: '0600',
|
|
1610
|
-
// iban: 'CZ6406000000000224252290',
|
|
1611
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1612
|
-
// },
|
|
1613
|
-
// fallbackLastSync: monthAgo,
|
|
1614
|
-
// currency: 'USD',
|
|
1615
|
-
// production: true,
|
|
1616
|
-
// },
|
|
1617
|
-
// // NEY spořitelní družstvo (2260)
|
|
1618
|
-
// {
|
|
1619
|
-
// connectorKey: 'FINBRICKS',
|
|
1620
|
-
// id: '2260-CZK',
|
|
1621
|
-
// identification: {
|
|
1622
|
-
// number: '1702700014',
|
|
1623
|
-
// bankCode: '2260',
|
|
1624
|
-
// iban: 'CZ7422600000001702700014',
|
|
1625
|
-
// holderName: 'Devizová Burza a.s.',
|
|
1626
|
-
// },
|
|
1627
|
-
// fallbackLastSync: monthAgo,
|
|
1628
|
-
// currency: 'CZK',
|
|
1629
|
-
// production: true,
|
|
1630
|
-
// },
|
|
1631
|
-
// ],
|
|
1632
|
-
}
|
|
1633
|
-
});
|
|
1634
|
-
|
|
1635
|
-
export { BankService as default, defineBankService };
|
|
1207
|
+
export { defineBankService };
|