@develit-services/bank 0.0.28 → 0.0.29
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 +10 -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 +8 -1
- package/dist/export/worker.cjs +762 -575
- package/dist/export/worker.d.cts +52 -12
- package/dist/export/worker.d.mts +52 -12
- package/dist/export/worker.d.ts +52 -12
- package/dist/export/worker.mjs +732 -545
- package/dist/export/wrangler.cjs +1 -1
- package/dist/export/wrangler.d.cts +2 -3
- package/dist/export/wrangler.d.mts +2 -3
- package/dist/export/wrangler.d.ts +2 -3
- package/dist/export/wrangler.mjs +1 -1
- package/dist/shared/{bank.BuNG2S8h.d.cts → bank.07oMM145.d.cts} +528 -11
- package/dist/shared/{bank.BuNG2S8h.d.mts → bank.07oMM145.d.mts} +528 -11
- package/dist/shared/{bank.BuNG2S8h.d.ts → bank.07oMM145.d.ts} +528 -11
- package/dist/shared/bank.5CiXtVIb.mjs +9 -0
- package/dist/shared/{bank.CEZKAEiY.d.cts → bank.BchnXQDL.d.cts} +2 -2
- package/dist/shared/{bank.CEZKAEiY.d.mts → bank.BchnXQDL.d.mts} +2 -2
- package/dist/shared/{bank.CEZKAEiY.d.ts → bank.BchnXQDL.d.ts} +2 -2
- package/dist/shared/bank.BeJh7l2V.cjs +11 -0
- package/dist/shared/bank.By8Vh0l5.d.ts +1648 -0
- package/dist/shared/bank.CWt0unt2.d.cts +1648 -0
- package/dist/shared/{bank.DnDcNEvX.mjs → bank.Ce4ZEpjD.mjs} +329 -107
- package/dist/shared/bank.DS18_iuS.d.mts +1648 -0
- package/dist/shared/{bank.Cy_TcyKb.cjs → bank.DXzEZPsO.cjs} +346 -106
- package/dist/types.cjs +32 -20
- package/dist/types.d.cts +496 -35
- package/dist/types.d.mts +496 -35
- package/dist/types.d.ts +496 -35
- package/dist/types.mjs +5 -4
- package/package.json +1 -1
- package/dist/shared/bank.BkLncGmL.d.ts +0 -122
- package/dist/shared/bank.C9jAvwna.mjs +0 -90
- package/dist/shared/bank.DWVLVMDa.d.mts +0 -122
- package/dist/shared/bank.DmypH3Au.d.cts +0 -122
- package/dist/shared/bank.P9gDUycr.cjs +0 -98
package/dist/export/worker.cjs
CHANGED
|
@@ -3,100 +3,57 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
6
|
-
const
|
|
6
|
+
const database_schema = require('../shared/bank.DXzEZPsO.cjs');
|
|
7
7
|
const cloudflare_workers = require('cloudflare:workers');
|
|
8
8
|
const d1 = require('drizzle-orm/d1');
|
|
9
9
|
const zod = require('zod');
|
|
10
10
|
const generalCodes = require('@develit-io/general-codes');
|
|
11
|
-
const database_schema = require('../shared/bank.P9gDUycr.cjs');
|
|
12
11
|
require('jose');
|
|
13
12
|
const drizzleOrm = require('drizzle-orm');
|
|
13
|
+
const mockCobs_connector = require('../shared/bank.BeJh7l2V.cjs');
|
|
14
14
|
const superjson = require('superjson');
|
|
15
|
-
require('
|
|
15
|
+
require('drizzle-zod');
|
|
16
16
|
require('drizzle-orm/sqlite-core');
|
|
17
|
+
require('date-fns');
|
|
17
18
|
require('drizzle-orm/relations');
|
|
18
19
|
|
|
19
20
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
20
21
|
|
|
21
22
|
const superjson__default = /*#__PURE__*/_interopDefaultCompat(superjson);
|
|
22
23
|
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
debtorAccountNumberWithBankCode: zod.z.string(),
|
|
37
|
-
debtorIban: zod.z.string()
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
const getAuthUriInputSchema = zod.z.object({
|
|
41
|
-
accountId: zod.z.string()
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
const authorizeAccountInputSchema = zod.z.object({
|
|
45
|
-
ott: zod.z.string(),
|
|
46
|
-
urlParams: zod.z.string()
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const simulateDepositInputSchema = zod.z.object({
|
|
50
|
-
amount: zod.z.number(),
|
|
51
|
-
currency: zod.z.enum(generalCodes.CURRENCY_CODES),
|
|
52
|
-
bankingVs: zod.z.string().max(10),
|
|
53
|
-
bankingSs: zod.z.string().max(10).optional(),
|
|
54
|
-
bankingKs: zod.z.string().max(10).optional(),
|
|
55
|
-
message: zod.z.string(),
|
|
56
|
-
creditorIban: zod.z.string().max(34),
|
|
57
|
-
creditorHolderName: zod.z.string(),
|
|
58
|
-
debtorIban: zod.z.string().max(34),
|
|
59
|
-
debtorHolderName: zod.z.string()
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
const setLastSyncAtInputSchema = zod.z.object({
|
|
63
|
-
iban: zod.z.string(),
|
|
64
|
-
lastSyncedAt: zod.z.coerce.date()
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
const initiateConnectorInputSchema = zod.z.object({
|
|
68
|
-
connectorKey: zod.z.enum(database_schema.CONNECTOR_KEYS)
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
const getBatchesInputSchema = zod.z.object({
|
|
72
|
-
limit: zod.z.number().positive().optional().default(100),
|
|
73
|
-
offset: zod.z.number().min(0).optional().default(0)
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
const processBatchInputSchema = zod.z.object({
|
|
77
|
-
connectorKey: zod.z.enum(database_schema.CONNECTOR_KEYS),
|
|
78
|
-
batch: zod.z.custom()
|
|
79
|
-
});
|
|
24
|
+
const upsertAccountCommand = (db, { account }) => {
|
|
25
|
+
const id = account.id || backendSdk.uuidv4();
|
|
26
|
+
const command = db.insert(database_schema.tables.account).values({ ...account, id }).onConflictDoUpdate({
|
|
27
|
+
target: database_schema.tables.account.iban,
|
|
28
|
+
set: {
|
|
29
|
+
...account
|
|
30
|
+
}
|
|
31
|
+
}).returning();
|
|
32
|
+
return {
|
|
33
|
+
id,
|
|
34
|
+
command
|
|
35
|
+
};
|
|
36
|
+
};
|
|
80
37
|
|
|
81
|
-
const createPaymentCommand = (db
|
|
38
|
+
const createPaymentCommand = (db, { payment }) => {
|
|
82
39
|
return {
|
|
83
|
-
command: db
|
|
40
|
+
command: db.insert(database_schema.tables.payment).values(payment).returning()
|
|
84
41
|
};
|
|
85
42
|
};
|
|
86
43
|
|
|
87
|
-
const updatePaymentCommand = (db
|
|
44
|
+
const updatePaymentCommand = (db, { payment }) => {
|
|
88
45
|
return {
|
|
89
|
-
command: db
|
|
46
|
+
command: db.update(database_schema.tables.payment).set(payment).where(drizzleOrm.eq(database_schema.tables.payment.id, payment.id)).returning()
|
|
90
47
|
};
|
|
91
48
|
};
|
|
92
49
|
|
|
93
|
-
const upsertBatchCommand = (db
|
|
50
|
+
const upsertBatchCommand = (db, { batch }) => {
|
|
94
51
|
const id = batch.id || backendSdk.uuidv4();
|
|
95
|
-
const command = db
|
|
52
|
+
const command = db.insert(database_schema.tables.batch).values({
|
|
96
53
|
...batch,
|
|
97
54
|
id
|
|
98
55
|
}).onConflictDoUpdate({
|
|
99
|
-
target:
|
|
56
|
+
target: database_schema.tables.batch.id,
|
|
100
57
|
set: {
|
|
101
58
|
...batch
|
|
102
59
|
}
|
|
@@ -107,112 +64,160 @@ const upsertBatchCommand = (db$1, { batch }) => {
|
|
|
107
64
|
};
|
|
108
65
|
};
|
|
109
66
|
|
|
110
|
-
const createOneTimeTokenCommand = (db
|
|
67
|
+
const createOneTimeTokenCommand = (db, {
|
|
111
68
|
ott,
|
|
112
|
-
|
|
69
|
+
refId,
|
|
113
70
|
tokenType
|
|
114
71
|
}) => {
|
|
115
72
|
const id = backendSdk.uuidv4();
|
|
116
73
|
const expiresAt = new Date(Date.now() + 1e3 * 60 * 60) ;
|
|
117
|
-
const command = db
|
|
74
|
+
const command = db.insert(database_schema.tables.ott).values({
|
|
118
75
|
id,
|
|
119
76
|
oneTimeToken: ott,
|
|
120
77
|
tokenType,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
expiresAt
|
|
78
|
+
expiresAt,
|
|
79
|
+
refId
|
|
124
80
|
}).returning();
|
|
125
81
|
return { id, command };
|
|
126
82
|
};
|
|
127
83
|
|
|
128
|
-
const
|
|
129
|
-
|
|
84
|
+
const expireOneTimeTokenCommand = (db, {
|
|
85
|
+
ott
|
|
86
|
+
}) => {
|
|
87
|
+
return {
|
|
88
|
+
command: db.update(database_schema.tables.ott).set({
|
|
89
|
+
expiresAt: /* @__PURE__ */ new Date()
|
|
90
|
+
}).where(drizzleOrm.eq(database_schema.tables.ott.oneTimeToken, ott))
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const createAccountCredentialsCommand = (db, { credentials }) => {
|
|
95
|
+
const id = credentials.id || backendSdk.uuidv4();
|
|
96
|
+
const command = db.insert(database_schema.tables.accountCredentials).values({ ...credentials, id }).returning();
|
|
97
|
+
return {
|
|
98
|
+
id,
|
|
99
|
+
command
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const deleteAccountCredentialsCommand = (db, { accountId }) => {
|
|
104
|
+
const command = db.delete(database_schema.tables.accountCredentials).where(drizzleOrm.eq(database_schema.tables.accountCredentials.accountId, accountId));
|
|
105
|
+
return {
|
|
106
|
+
command
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const getPaymentByRefIdQuery = async (db, { refId }) => {
|
|
111
|
+
const payment = await db.select().from(database_schema.tables.payment).where(drizzleOrm.eq(database_schema.tables.payment.refId, refId)).limit(1).get();
|
|
130
112
|
return payment;
|
|
131
113
|
};
|
|
132
114
|
|
|
133
|
-
const getOpenBatchByAccountIdQuery = async (db
|
|
134
|
-
const batch = await db
|
|
115
|
+
const getOpenBatchByAccountIdQuery = async (db, { accountId }) => {
|
|
116
|
+
const batch = await db.select().from(database_schema.tables.batch).where(
|
|
135
117
|
drizzleOrm.and(
|
|
136
|
-
drizzleOrm.eq(
|
|
137
|
-
drizzleOrm.eq(
|
|
118
|
+
drizzleOrm.eq(database_schema.tables.batch.accountId, accountId),
|
|
119
|
+
drizzleOrm.eq(database_schema.tables.batch.status, "OPEN")
|
|
138
120
|
)
|
|
139
121
|
).limit(1).get();
|
|
140
122
|
return batch;
|
|
141
123
|
};
|
|
142
124
|
|
|
143
|
-
const getPaymentsByBankRefIdsQuery = async (db
|
|
144
|
-
return await db
|
|
125
|
+
const getPaymentsByBankRefIdsQuery = async (db, { ids }) => {
|
|
126
|
+
return await db.select().from(database_schema.tables.payment).where(drizzleOrm.inArray(database_schema.tables.payment.bankRefId, ids));
|
|
145
127
|
};
|
|
146
128
|
|
|
147
|
-
const getOttQuery = async (db
|
|
148
|
-
return await db
|
|
129
|
+
const getOttQuery = async (db, { ott }) => {
|
|
130
|
+
return await db.select().from(database_schema.tables.ott).where(drizzleOrm.eq(database_schema.tables.ott.oneTimeToken, ott)).get();
|
|
149
131
|
};
|
|
150
132
|
|
|
151
|
-
|
|
133
|
+
const getAllPendingBatchesQuery = (db) => {
|
|
134
|
+
return db.select().from(database_schema.tables.batch).where(
|
|
135
|
+
drizzleOrm.inArray(database_schema.tables.batch.status, [
|
|
136
|
+
"PROCESSING",
|
|
137
|
+
"READY_TO_SIGN",
|
|
138
|
+
"WAITING_FOR_PROCESSING"
|
|
139
|
+
])
|
|
140
|
+
);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const getCredentialsByAccountId = async (db, { accountId }) => {
|
|
144
|
+
const cred = await db.select().from(database_schema.tables.accountCredentials).where(drizzleOrm.eq(database_schema.tables.accountCredentials.accountId, accountId)).get();
|
|
145
|
+
return cred;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const getAccountByIbanQuery = async (db, { iban }) => {
|
|
149
|
+
return await db.select().from(database_schema.tables.account).where(drizzleOrm.eq(database_schema.tables.account.iban, iban)).get();
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
class CreditasConnector extends database_schema.FinbricksConnector {
|
|
152
153
|
constructor(config) {
|
|
153
154
|
super("CREDITAS", config);
|
|
154
155
|
}
|
|
155
156
|
}
|
|
156
157
|
|
|
157
|
-
class FioConnector extends
|
|
158
|
+
class FioConnector extends database_schema.FinbricksConnector {
|
|
158
159
|
constructor(config) {
|
|
159
160
|
super("FIO", config);
|
|
160
161
|
}
|
|
161
162
|
}
|
|
162
163
|
|
|
163
|
-
class MonetaConnector extends
|
|
164
|
+
class MonetaConnector extends database_schema.FinbricksConnector {
|
|
164
165
|
constructor(config) {
|
|
165
166
|
super("MONETA", config);
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
169
|
|
|
169
|
-
const initiateConnector = (
|
|
170
|
+
const initiateConnector = ({
|
|
171
|
+
bank,
|
|
172
|
+
env,
|
|
173
|
+
connectedAccounts
|
|
174
|
+
}) => {
|
|
170
175
|
switch (bank) {
|
|
171
176
|
case "ERSTE":
|
|
172
|
-
return new
|
|
177
|
+
return new database_schema.ErsteConnector({
|
|
173
178
|
API_KEY: env.ERSTE_API_KEY,
|
|
174
179
|
CLIENT_ID: env.ERSTE_CLIENT_ID,
|
|
175
180
|
CLIENT_SECRET: env.ERSTE_CLIENT_SECRET,
|
|
176
|
-
REDIRECT_URI: env.
|
|
181
|
+
REDIRECT_URI: env.REDIRECT_URI,
|
|
177
182
|
AUTH_URI: env.ERSTE_AUTH_URI,
|
|
178
183
|
PAYMENTS_URI: env.ERSTE_PAYMENTS_URI,
|
|
179
184
|
ACCOUNTS_URI: env.ERSTE_ACCOUNTS_URI,
|
|
180
|
-
|
|
185
|
+
connectedAccounts
|
|
181
186
|
});
|
|
182
187
|
case "CREDITAS":
|
|
183
188
|
return new CreditasConnector({
|
|
184
189
|
BASE_URI: env.FINBRICKS_BASE_URI,
|
|
185
190
|
MERCHANT_ID: env.FINBRICKS_MERCHANT_ID,
|
|
186
191
|
PRIVATE_KEY_PEM: env.FINBRICKS_PRIVATE_KEY_PEM,
|
|
187
|
-
REDIRECT_URI: env.
|
|
188
|
-
|
|
192
|
+
REDIRECT_URI: env.REDIRECT_URI,
|
|
193
|
+
connectedAccounts
|
|
189
194
|
});
|
|
190
195
|
case "MOCK_COBS":
|
|
191
|
-
return new
|
|
196
|
+
return new mockCobs_connector.MockCobsConnector({
|
|
192
197
|
BASE_URI: env.FINBRICKS_BASE_URI,
|
|
193
198
|
MERCHANT_ID: env.FINBRICKS_MERCHANT_ID,
|
|
194
199
|
PRIVATE_KEY_PEM: env.FINBRICKS_PRIVATE_KEY_PEM,
|
|
195
|
-
REDIRECT_URI: env.
|
|
196
|
-
|
|
200
|
+
REDIRECT_URI: env.REDIRECT_URI,
|
|
201
|
+
connectedAccounts
|
|
197
202
|
});
|
|
198
203
|
case "FIO":
|
|
199
204
|
return new FioConnector({
|
|
200
205
|
BASE_URI: env.FINBRICKS_BASE_URI,
|
|
201
206
|
MERCHANT_ID: env.FINBRICKS_MERCHANT_ID,
|
|
202
207
|
PRIVATE_KEY_PEM: env.FINBRICKS_PRIVATE_KEY_PEM,
|
|
203
|
-
REDIRECT_URI: env.
|
|
204
|
-
|
|
208
|
+
REDIRECT_URI: env.REDIRECT_URI,
|
|
209
|
+
connectedAccounts
|
|
205
210
|
});
|
|
206
211
|
case "MONETA":
|
|
207
212
|
return new MonetaConnector({
|
|
208
213
|
BASE_URI: env.FINBRICKS_BASE_URI,
|
|
209
214
|
MERCHANT_ID: env.FINBRICKS_MERCHANT_ID,
|
|
210
215
|
PRIVATE_KEY_PEM: env.FINBRICKS_PRIVATE_KEY_PEM,
|
|
211
|
-
REDIRECT_URI: env.
|
|
212
|
-
|
|
216
|
+
REDIRECT_URI: env.REDIRECT_URI,
|
|
217
|
+
connectedAccounts
|
|
213
218
|
});
|
|
214
219
|
default:
|
|
215
|
-
return new
|
|
220
|
+
return new database_schema.MockConnector();
|
|
216
221
|
}
|
|
217
222
|
};
|
|
218
223
|
|
|
@@ -221,7 +226,7 @@ const useSync = (kv) => {
|
|
|
221
226
|
account
|
|
222
227
|
}) => {
|
|
223
228
|
const [rawSync, rawSyncError] = await backendSdk.useResult(
|
|
224
|
-
kv.get(`sync-log:${account.
|
|
229
|
+
kv.get(`sync-log:${account.iban}:${account.currency}`)
|
|
225
230
|
);
|
|
226
231
|
if (rawSyncError) throw backendSdk.createInternalError(rawSyncError);
|
|
227
232
|
if (!rawSync) return null;
|
|
@@ -233,7 +238,7 @@ const useSync = (kv) => {
|
|
|
233
238
|
}) => {
|
|
234
239
|
const [_, error] = await backendSdk.useResult(
|
|
235
240
|
kv.put(
|
|
236
|
-
`sync-log:${account.
|
|
241
|
+
`sync-log:${account.iban}:${account.currency}`,
|
|
237
242
|
superjson__default.stringify(log)
|
|
238
243
|
)
|
|
239
244
|
);
|
|
@@ -249,7 +254,7 @@ const seperateSupportedPayments = (mappedPayments, accounts) => {
|
|
|
249
254
|
const [supportedPayments, unsupportedPayments] = mappedPayments.reduce(
|
|
250
255
|
([valid, invalid], payment) => {
|
|
251
256
|
const isValid = accounts.some(
|
|
252
|
-
(acc) => acc.
|
|
257
|
+
(acc) => acc.iban === payment.debtorIban && acc.currency === payment.currency
|
|
253
258
|
);
|
|
254
259
|
if (isValid) {
|
|
255
260
|
valid.push(payment);
|
|
@@ -266,6 +271,66 @@ const seperateSupportedPayments = (mappedPayments, accounts) => {
|
|
|
266
271
|
};
|
|
267
272
|
};
|
|
268
273
|
|
|
274
|
+
const sendPaymentInputSchema = zod.z.object({
|
|
275
|
+
refId: zod.z.string(),
|
|
276
|
+
amount: zod.z.number().positive(),
|
|
277
|
+
paymentType: zod.z.enum(database_schema.PAYMENT_TYPES),
|
|
278
|
+
currency: zod.z.enum(generalCodes.CURRENCY_CODES),
|
|
279
|
+
vs: zod.z.string().nullable().optional(),
|
|
280
|
+
ss: zod.z.string().nullable().optional(),
|
|
281
|
+
ks: zod.z.string().nullable().optional(),
|
|
282
|
+
message: zod.z.string().nullable().optional(),
|
|
283
|
+
creditorHolderName: zod.z.string(),
|
|
284
|
+
creditorAccountNumberWithBankCode: zod.z.string(),
|
|
285
|
+
creditorIban: zod.z.string(),
|
|
286
|
+
debtorHolderName: zod.z.string(),
|
|
287
|
+
debtorAccountNumberWithBankCode: zod.z.string(),
|
|
288
|
+
debtorIban: zod.z.string()
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
const getAuthUriInputSchema = zod.z.object({
|
|
292
|
+
connectorKey: zod.z.enum(database_schema.CONNECTOR_KEYS)
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
const authorizeAccountInputSchema = zod.z.object({
|
|
296
|
+
ott: zod.z.string(),
|
|
297
|
+
urlParams: zod.z.string()
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
const simulateDepositInputSchema = zod.z.object({
|
|
301
|
+
amount: zod.z.number(),
|
|
302
|
+
currency: zod.z.enum(generalCodes.CURRENCY_CODES),
|
|
303
|
+
bankingVs: zod.z.string().max(10),
|
|
304
|
+
bankingSs: zod.z.string().max(10).optional(),
|
|
305
|
+
bankingKs: zod.z.string().max(10).optional(),
|
|
306
|
+
message: zod.z.string(),
|
|
307
|
+
creditorIban: zod.z.string().max(34),
|
|
308
|
+
creditorHolderName: zod.z.string(),
|
|
309
|
+
debtorIban: zod.z.string().max(34),
|
|
310
|
+
debtorHolderName: zod.z.string(),
|
|
311
|
+
connectorKey: zod.z.enum(database_schema.CONNECTOR_KEYS)
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
const setLastSyncAtInputSchema = zod.z.object({
|
|
315
|
+
iban: zod.z.string(),
|
|
316
|
+
lastSyncedAt: zod.z.coerce.date()
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
const initiateConnectorInputSchema = zod.z.object({
|
|
320
|
+
connectorKey: zod.z.enum(database_schema.CONNECTOR_KEYS),
|
|
321
|
+
withAuth: zod.z.boolean().default(true).optional()
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
const getBatchesInputSchema = zod.z.object({
|
|
325
|
+
limit: zod.z.number().positive().optional().default(100),
|
|
326
|
+
offset: zod.z.number().min(0).optional().default(0)
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
const processBatchInputSchema = zod.z.object({
|
|
330
|
+
connectorKey: zod.z.enum(database_schema.CONNECTOR_KEYS),
|
|
331
|
+
batch: zod.z.custom()
|
|
332
|
+
});
|
|
333
|
+
|
|
269
334
|
var __defProp = Object.defineProperty;
|
|
270
335
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
271
336
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -277,22 +342,26 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
277
342
|
return result;
|
|
278
343
|
};
|
|
279
344
|
let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.WorkerEntrypoint) {
|
|
280
|
-
constructor(ctx, env,
|
|
345
|
+
constructor(ctx, env, config) {
|
|
281
346
|
super(ctx, env);
|
|
282
|
-
this.
|
|
283
|
-
this.
|
|
347
|
+
this.allowedProviders = [];
|
|
348
|
+
this.allowedProviders = config.allowedProviders;
|
|
349
|
+
this.db = d1.drizzle(this.env.BANK_D1, { schema: database_schema.tables });
|
|
350
|
+
}
|
|
351
|
+
getAllowedProviders() {
|
|
352
|
+
return this.allowedProviders;
|
|
284
353
|
}
|
|
285
|
-
|
|
286
|
-
return this.
|
|
354
|
+
async getAccounts() {
|
|
355
|
+
return await this.db.select().from(database_schema.tables.account);
|
|
287
356
|
}
|
|
288
357
|
accountFetchInterval(connectorKey) {
|
|
289
358
|
switch (connectorKey) {
|
|
290
359
|
case "ERSTE":
|
|
291
|
-
return
|
|
360
|
+
return database_schema.ErsteConnector.FETCH_INTERVAL;
|
|
292
361
|
case "FINBRICKS":
|
|
293
|
-
return
|
|
362
|
+
return database_schema.FinbricksConnector.FETCH_INTERVAL;
|
|
294
363
|
case "MOCK":
|
|
295
|
-
return
|
|
364
|
+
return database_schema.MockConnector.FETCH_INTERVAL;
|
|
296
365
|
default:
|
|
297
366
|
return 0;
|
|
298
367
|
}
|
|
@@ -301,16 +370,17 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
301
370
|
return this.handleAction(null, {}, async () => {
|
|
302
371
|
const accountsToSync = [];
|
|
303
372
|
const { getLastSync } = useSync(this.env.BANK_KV);
|
|
304
|
-
|
|
373
|
+
const accounts = await this.getAccounts();
|
|
374
|
+
for (const account of accounts.filter(
|
|
305
375
|
(acc) => !!!acc.connectorKey.includes("MOCK")
|
|
306
376
|
)) {
|
|
307
|
-
let lastSync = await getLastSync({ account });
|
|
377
|
+
let lastSync = await getLastSync({ account: { ...account, token: "" } });
|
|
308
378
|
if (!lastSync) {
|
|
309
379
|
await this.setLastSyncAt({
|
|
310
|
-
iban: account.
|
|
311
|
-
lastSyncedAt: account.
|
|
380
|
+
iban: account.iban,
|
|
381
|
+
lastSyncedAt: account.lastSyncedAt || /* @__PURE__ */ new Date()
|
|
312
382
|
});
|
|
313
|
-
lastSync = await getLastSync({ account });
|
|
383
|
+
lastSync = await getLastSync({ account: { ...account, token: "" } });
|
|
314
384
|
if (!lastSync) continue;
|
|
315
385
|
}
|
|
316
386
|
const accountFetchInterval = this.accountFetchInterval(
|
|
@@ -323,7 +393,8 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
323
393
|
if (!shouldFetch) continue;
|
|
324
394
|
accountsToSync.push({
|
|
325
395
|
...account,
|
|
326
|
-
lastSyncAt: lastSync
|
|
396
|
+
lastSyncAt: lastSync,
|
|
397
|
+
token: ""
|
|
327
398
|
});
|
|
328
399
|
}
|
|
329
400
|
console.log("ACCS TO SYNC", accountsToSync.length);
|
|
@@ -336,16 +407,95 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
336
407
|
console.log("Scheduled CRON payments processing");
|
|
337
408
|
await this.syncAccounts();
|
|
338
409
|
}
|
|
410
|
+
if (controller.cron === this.env.CRON_BATCH_STATUSES) {
|
|
411
|
+
console.log("Scheduled CRON batch statuses");
|
|
412
|
+
await this.updateBatchStatuses();
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
async updateBatchStatuses() {
|
|
416
|
+
const pendingBatches = await getAllPendingBatchesQuery(this.db);
|
|
417
|
+
const uniqueConnectors = /* @__PURE__ */ new Set();
|
|
418
|
+
const accounts = await this.getAccounts();
|
|
419
|
+
for (const batch of pendingBatches) {
|
|
420
|
+
const connectorKey = accounts.find(
|
|
421
|
+
(acc) => acc.id === batch.accountId
|
|
422
|
+
).connectorKey;
|
|
423
|
+
if (!uniqueConnectors.has(connectorKey)) {
|
|
424
|
+
uniqueConnectors.add(connectorKey);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
const finalBatches = [];
|
|
428
|
+
for (const connectorKey of uniqueConnectors) {
|
|
429
|
+
const accs = accounts.filter((acc) => acc.connectorKey === connectorKey);
|
|
430
|
+
const updatedBatches = await Promise.all(
|
|
431
|
+
accs.map(async (account) => {
|
|
432
|
+
const batch = pendingBatches.find((acc) => acc.id === account.id);
|
|
433
|
+
const newStatus = await this.bankConnector.getBatchStatus({
|
|
434
|
+
batchId: batch.id
|
|
435
|
+
});
|
|
436
|
+
return {
|
|
437
|
+
...batch,
|
|
438
|
+
status: newStatus
|
|
439
|
+
};
|
|
440
|
+
})
|
|
441
|
+
);
|
|
442
|
+
finalBatches.push(...updatedBatches);
|
|
443
|
+
}
|
|
444
|
+
const updateBatchesCommands = finalBatches.map((batch) => {
|
|
445
|
+
const { command } = upsertBatchCommand(this.db, {
|
|
446
|
+
batch: {
|
|
447
|
+
...batch
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
return command;
|
|
451
|
+
});
|
|
452
|
+
console.log("Updated batches", finalBatches);
|
|
453
|
+
await this.db.batch([
|
|
454
|
+
updateBatchesCommands[0],
|
|
455
|
+
...updateBatchesCommands.slice(1)
|
|
456
|
+
]);
|
|
457
|
+
console.log("Batch update completed");
|
|
339
458
|
}
|
|
340
459
|
// @action('initiate-bank-connector')
|
|
341
460
|
async initiateBankConnector(input) {
|
|
342
461
|
return this.handleAction(
|
|
343
462
|
{ data: input, schema: initiateConnectorInputSchema },
|
|
344
463
|
{ successMessage: "Bank connector initiated successfully" },
|
|
345
|
-
async ({ connectorKey }) => {
|
|
346
|
-
this.
|
|
347
|
-
|
|
348
|
-
|
|
464
|
+
async ({ connectorKey, withAuth }) => {
|
|
465
|
+
if (!this.allowedProviders.includes(connectorKey)) {
|
|
466
|
+
throw backendSdk.createInternalError(null, {
|
|
467
|
+
message: `Invalid connector key: ${connectorKey}`
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
const accounts = await this.getAccounts();
|
|
471
|
+
const accountsForConnector = accounts.filter(
|
|
472
|
+
(acc) => acc.connectorKey === connectorKey
|
|
473
|
+
);
|
|
474
|
+
const accountsWithCredentials = await Promise.all(
|
|
475
|
+
accountsForConnector.map(async (acc) => {
|
|
476
|
+
const credentials = await getCredentialsByAccountId(this.db, {
|
|
477
|
+
accountId: acc.id
|
|
478
|
+
});
|
|
479
|
+
if (!credentials) {
|
|
480
|
+
throw backendSdk.createInternalError(null, {
|
|
481
|
+
message: `No credentials found for account ${acc.id}`
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
return {
|
|
485
|
+
currency: acc.currency,
|
|
486
|
+
iban: acc.iban,
|
|
487
|
+
token: credentials.value,
|
|
488
|
+
id: acc.id,
|
|
489
|
+
connectorKey: acc.connectorKey
|
|
490
|
+
};
|
|
491
|
+
})
|
|
492
|
+
);
|
|
493
|
+
this.bankConnector = initiateConnector({
|
|
494
|
+
bank: connectorKey,
|
|
495
|
+
connectedAccounts: accountsWithCredentials,
|
|
496
|
+
env: this.env
|
|
497
|
+
});
|
|
498
|
+
if (!withAuth) return;
|
|
349
499
|
await this.bankConnector.authenticate();
|
|
350
500
|
}
|
|
351
501
|
);
|
|
@@ -359,6 +509,7 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
359
509
|
(payment) => ({
|
|
360
510
|
id: backendSdk.uuidv4(),
|
|
361
511
|
refId: payment.refId,
|
|
512
|
+
connectorKey: "MOCK",
|
|
362
513
|
amount: payment.amount,
|
|
363
514
|
direction: "OUTGOING",
|
|
364
515
|
paymentType: payment.paymentType,
|
|
@@ -378,7 +529,10 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
378
529
|
debtorIban: payment.debtorIban
|
|
379
530
|
})
|
|
380
531
|
);
|
|
381
|
-
const { supportedPayments, unsupportedPayments } = seperateSupportedPayments(
|
|
532
|
+
const { supportedPayments, unsupportedPayments } = seperateSupportedPayments(
|
|
533
|
+
mappedPayments,
|
|
534
|
+
this.bankConnector.connectedAccounts
|
|
535
|
+
);
|
|
382
536
|
if (unsupportedPayments.length > 0) {
|
|
383
537
|
this.logError({ unsupportedPayments });
|
|
384
538
|
await this.pushToQueue(
|
|
@@ -404,15 +558,18 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
404
558
|
}))
|
|
405
559
|
);
|
|
406
560
|
}
|
|
407
|
-
for (const acc of this.
|
|
561
|
+
for (const acc of this.bankConnector.connectedAccounts) {
|
|
408
562
|
const newPayments = supportedPayments.filter(
|
|
409
|
-
(payment) => payment.debtorIban === acc.
|
|
410
|
-
)
|
|
563
|
+
(payment) => payment.debtorIban === acc.iban && payment.currency === acc.currency
|
|
564
|
+
).map((payment) => ({
|
|
565
|
+
...payment,
|
|
566
|
+
connectorKey: acc.connectorKey
|
|
567
|
+
}));
|
|
411
568
|
if (newPayments.length === 0) {
|
|
412
569
|
continue;
|
|
413
570
|
}
|
|
414
571
|
this.log({
|
|
415
|
-
message: `\u{1F4B0} Processing ${newPayments.length} payments for account
|
|
572
|
+
message: `\u{1F4B0} Processing ${newPayments.length} payments for account (${acc.iban}, ${acc.currency})`
|
|
416
573
|
});
|
|
417
574
|
const existingBatch = await getOpenBatchByAccountIdQuery(this.db, {
|
|
418
575
|
accountId: acc.id
|
|
@@ -584,26 +741,19 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
584
741
|
return this.handleAction(
|
|
585
742
|
{ data: input, schema: getAuthUriInputSchema },
|
|
586
743
|
{ successMessage: "Auth URI obtained." },
|
|
587
|
-
async ({
|
|
588
|
-
|
|
589
|
-
if (!account)
|
|
590
|
-
throw backendSdk.createInternalError(null, {
|
|
591
|
-
message: "Account not found",
|
|
592
|
-
code: "ACCOUNT_NOT_FOUND",
|
|
593
|
-
status: 404
|
|
594
|
-
});
|
|
595
|
-
this.bankConnector = initiateConnector(account.connectorKey, this.env);
|
|
744
|
+
async ({ connectorKey }) => {
|
|
745
|
+
await this.initiateBankConnector({ connectorKey, withAuth: false });
|
|
596
746
|
const ott = backendSdk.uuidv4();
|
|
597
|
-
const { command:
|
|
747
|
+
const { command: createOneTimeToken } = createOneTimeTokenCommand(
|
|
598
748
|
this.db,
|
|
599
749
|
{
|
|
600
750
|
ott,
|
|
601
|
-
|
|
751
|
+
refId: connectorKey,
|
|
602
752
|
tokenType: "ACCOUNT_AUTHORIZATION"
|
|
603
753
|
}
|
|
604
754
|
);
|
|
605
|
-
await
|
|
606
|
-
const uri = await this.bankConnector.getAuthUri({
|
|
755
|
+
await createOneTimeToken.execute();
|
|
756
|
+
const uri = await this.bankConnector.getAuthUri({ ott });
|
|
607
757
|
return { uri };
|
|
608
758
|
}
|
|
609
759
|
);
|
|
@@ -630,11 +780,50 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
630
780
|
status: 400
|
|
631
781
|
});
|
|
632
782
|
}
|
|
633
|
-
this.
|
|
634
|
-
|
|
783
|
+
await this.initiateBankConnector({
|
|
784
|
+
connectorKey: ottRow.refId
|
|
785
|
+
});
|
|
786
|
+
const { credentials, accounts } = await this.bankConnector.authorizeAccount({
|
|
635
787
|
urlParams
|
|
636
788
|
});
|
|
637
|
-
|
|
789
|
+
console.log("Bank connector initiated");
|
|
790
|
+
const alreadyExistingAccounts = (await this.getAccounts()).filter(
|
|
791
|
+
(acc) => acc.connectorKey === ottRow.refId && accounts.map((item) => item.iban).includes(acc.iban)
|
|
792
|
+
);
|
|
793
|
+
const upsertAccounts = accounts.map(
|
|
794
|
+
(acc) => upsertAccountCommand(this.db, {
|
|
795
|
+
account: acc
|
|
796
|
+
}).command
|
|
797
|
+
);
|
|
798
|
+
const deleteCredentials = alreadyExistingAccounts.map(
|
|
799
|
+
(acc) => deleteAccountCredentialsCommand(this.db, {
|
|
800
|
+
accountId: acc.id
|
|
801
|
+
}).command
|
|
802
|
+
);
|
|
803
|
+
const createAccountCredentials = credentials.map(
|
|
804
|
+
(cr) => createAccountCredentialsCommand(this.db, {
|
|
805
|
+
credentials: cr
|
|
806
|
+
}).command
|
|
807
|
+
);
|
|
808
|
+
const { command: updateOtt } = expireOneTimeTokenCommand(this.db, {
|
|
809
|
+
ott
|
|
810
|
+
});
|
|
811
|
+
await this.db.batch([
|
|
812
|
+
updateOtt,
|
|
813
|
+
...upsertAccounts,
|
|
814
|
+
...deleteCredentials,
|
|
815
|
+
...createAccountCredentials
|
|
816
|
+
]);
|
|
817
|
+
const fetchedAccounts = await this.getAccounts();
|
|
818
|
+
if (!fetchedAccounts)
|
|
819
|
+
throw backendSdk.createInternalError(null, {
|
|
820
|
+
message: "Account not found",
|
|
821
|
+
code: "NOT_FOUND",
|
|
822
|
+
status: 404
|
|
823
|
+
});
|
|
824
|
+
return {
|
|
825
|
+
accounts: fetchedAccounts
|
|
826
|
+
};
|
|
638
827
|
}
|
|
639
828
|
);
|
|
640
829
|
}
|
|
@@ -660,10 +849,7 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
660
849
|
if (!payments || payments.length === 0) continue;
|
|
661
850
|
this.log(payments);
|
|
662
851
|
payments.forEach((payment) => {
|
|
663
|
-
payment.direction =
|
|
664
|
-
payment,
|
|
665
|
-
account.identification.iban
|
|
666
|
-
);
|
|
852
|
+
payment.direction = database_schema.getPaymentDirection(payment, account.iban);
|
|
667
853
|
});
|
|
668
854
|
allFetchedPayments.push(...payments);
|
|
669
855
|
}
|
|
@@ -686,7 +872,7 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
686
872
|
console.log("FETCHEDPAYMANETS TO SYNC", allFetchedPayments.length);
|
|
687
873
|
for (const account of accounts) {
|
|
688
874
|
const paymentsForAccount = allFetchedPayments.filter(
|
|
689
|
-
(payment) => (payment.direction === "OUTGOING" ? payment.debtorIban : payment.creditorIban) === account.
|
|
875
|
+
(payment) => (payment.direction === "OUTGOING" ? payment.debtorIban : payment.creditorIban) === account.iban
|
|
690
876
|
);
|
|
691
877
|
let lastSyncPayment;
|
|
692
878
|
lastSyncPayment = paymentsForAccount.filter(({ status }) => status !== "COMPLETED").sort(
|
|
@@ -733,11 +919,13 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
733
919
|
creditorIban,
|
|
734
920
|
creditorHolderName,
|
|
735
921
|
debtorIban,
|
|
736
|
-
debtorHolderName
|
|
922
|
+
debtorHolderName,
|
|
923
|
+
connectorKey
|
|
737
924
|
}) => {
|
|
738
925
|
const payment = {
|
|
739
926
|
id: backendSdk.uuidv4(),
|
|
740
927
|
amount,
|
|
928
|
+
connectorKey,
|
|
741
929
|
direction: "INCOMING",
|
|
742
930
|
paymentType: "DOMESTIC",
|
|
743
931
|
currency,
|
|
@@ -775,10 +963,10 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
775
963
|
{ successMessage: "Last sync set." },
|
|
776
964
|
async ({ iban, lastSyncedAt }) => {
|
|
777
965
|
const { setLastSync } = useSync(this.env.BANK_KV);
|
|
778
|
-
const
|
|
779
|
-
|
|
780
|
-
);
|
|
781
|
-
if (!
|
|
966
|
+
const account = await getAccountByIbanQuery(this.db, {
|
|
967
|
+
iban
|
|
968
|
+
});
|
|
969
|
+
if (!account) {
|
|
782
970
|
throw backendSdk.createInternalError(null, {
|
|
783
971
|
status: 404,
|
|
784
972
|
message: "Account for this organization does not exist."
|
|
@@ -788,7 +976,7 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
788
976
|
log: {
|
|
789
977
|
lastSyncedAt
|
|
790
978
|
},
|
|
791
|
-
account:
|
|
979
|
+
account: { ...account, token: "" }
|
|
792
980
|
});
|
|
793
981
|
return {};
|
|
794
982
|
}
|
|
@@ -808,7 +996,7 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
808
996
|
}
|
|
809
997
|
async getBankAccounts() {
|
|
810
998
|
return backendSdk.RPCResponse.ok("Bank accounts retrieved successfully", {
|
|
811
|
-
data: this.
|
|
999
|
+
data: await this.getAccounts()
|
|
812
1000
|
});
|
|
813
1001
|
}
|
|
814
1002
|
async getBatches(input) {
|
|
@@ -817,8 +1005,8 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
817
1005
|
{ successMessage: "Batches retrieved successfully" },
|
|
818
1006
|
async ({ limit = 100, offset = 0 }) => {
|
|
819
1007
|
const [batchesResult, countResult] = await Promise.all([
|
|
820
|
-
this.db.select().from(
|
|
821
|
-
this.db.select({ count: drizzleOrm.sql`count(*)`.as("count") }).from(
|
|
1008
|
+
this.db.select().from(database_schema.tables.batch).limit(limit).offset(offset).orderBy(drizzleOrm.desc(database_schema.tables.batch.createdAt)),
|
|
1009
|
+
this.db.select({ count: drizzleOrm.sql`count(*)`.as("count") }).from(database_schema.tables.batch)
|
|
822
1010
|
]);
|
|
823
1011
|
const totalCount = Number(countResult[0]?.count) || 0;
|
|
824
1012
|
return {
|
|
@@ -835,6 +1023,9 @@ __decorateClass([
|
|
|
835
1023
|
__decorateClass([
|
|
836
1024
|
backendSdk.action("scheduled")
|
|
837
1025
|
], BankServiceBase.prototype, "scheduled", 1);
|
|
1026
|
+
__decorateClass([
|
|
1027
|
+
backendSdk.action("update-batch-statuses")
|
|
1028
|
+
], BankServiceBase.prototype, "updateBatchStatuses", 1);
|
|
838
1029
|
__decorateClass([
|
|
839
1030
|
backendSdk.action("add-payments-to-batch")
|
|
840
1031
|
], BankServiceBase.prototype, "addPaymentsToBatch", 1);
|
|
@@ -872,433 +1063,429 @@ BankServiceBase = __decorateClass([
|
|
|
872
1063
|
backendSdk.service("bank")
|
|
873
1064
|
], BankServiceBase);
|
|
874
1065
|
function defineBankService({
|
|
875
|
-
|
|
1066
|
+
config
|
|
876
1067
|
}) {
|
|
877
1068
|
return class BankService extends BankServiceBase {
|
|
878
1069
|
constructor(ctx, env) {
|
|
879
|
-
super(ctx, env,
|
|
1070
|
+
super(ctx, env, config);
|
|
880
1071
|
}
|
|
881
1072
|
};
|
|
882
1073
|
}
|
|
883
1074
|
|
|
884
|
-
const monthAgo = new Date(
|
|
885
|
-
Date.now() - 30 * 24 * 60 * 60 * 1e3
|
|
886
|
-
// 30 days ago
|
|
887
|
-
);
|
|
888
1075
|
const BankService = defineBankService({
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
],
|
|
956
|
-
productionAccounts: [
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
]
|
|
1076
|
+
config: {
|
|
1077
|
+
allowedProviders: []
|
|
1078
|
+
// {
|
|
1079
|
+
// connectorKey: 'MOCK_COBS',
|
|
1080
|
+
// id: 'staging-czk',
|
|
1081
|
+
// identification: {
|
|
1082
|
+
// number: '1234567890',
|
|
1083
|
+
// bankCode: '5051',
|
|
1084
|
+
// iban: 'CZ0350510000000000000449',
|
|
1085
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1086
|
+
// },
|
|
1087
|
+
// fallbackLastSync: monthAgo,
|
|
1088
|
+
// currency: 'CZK',
|
|
1089
|
+
// production: false,
|
|
1090
|
+
// },
|
|
1091
|
+
// {
|
|
1092
|
+
// connectorKey: 'MOCK_COBS',
|
|
1093
|
+
// id: 'staging-eur',
|
|
1094
|
+
// identification: {
|
|
1095
|
+
// number: '2345678901',
|
|
1096
|
+
// bankCode: '5051',
|
|
1097
|
+
// iban: 'CZ0750510000000000000668',
|
|
1098
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1099
|
+
// },
|
|
1100
|
+
// fallbackLastSync: monthAgo,
|
|
1101
|
+
// currency: 'EUR',
|
|
1102
|
+
// production: false,
|
|
1103
|
+
// },
|
|
1104
|
+
// {
|
|
1105
|
+
// connectorKey: 'FIO',
|
|
1106
|
+
// id: 'kleinpetr-test',
|
|
1107
|
+
// identification: {
|
|
1108
|
+
// number: '2502130437',
|
|
1109
|
+
// bankCode: '2010',
|
|
1110
|
+
// iban: 'CZ8520100000002502130437',
|
|
1111
|
+
// holderName: 'Petr Klein',
|
|
1112
|
+
// },
|
|
1113
|
+
// fallbackLastSync: monthAgo,
|
|
1114
|
+
// currency: 'CZK',
|
|
1115
|
+
// production: true,
|
|
1116
|
+
// },
|
|
1117
|
+
// {
|
|
1118
|
+
// connectorKey: 'MOCK',
|
|
1119
|
+
// id: 'id-test',
|
|
1120
|
+
// identification: {
|
|
1121
|
+
// number: '777777777',
|
|
1122
|
+
// bankCode: '0800',
|
|
1123
|
+
// iban: 'PL0000000000002444430437',
|
|
1124
|
+
// holderName: 'Test Test',
|
|
1125
|
+
// },
|
|
1126
|
+
// fallbackLastSync: monthAgo,
|
|
1127
|
+
// currency: 'PLN',
|
|
1128
|
+
// production: false,
|
|
1129
|
+
// },
|
|
1130
|
+
// {
|
|
1131
|
+
// connectorKey: 'MOCK_COBS',
|
|
1132
|
+
// id: 'staging-usd',
|
|
1133
|
+
// identification: {
|
|
1134
|
+
// iban: 'CZ3456789012345678901234',
|
|
1135
|
+
// accountNumberWithBankCode: '3456789012/3456',
|
|
1136
|
+
// },
|
|
1137
|
+
// currency: 'USD',
|
|
1138
|
+
// bankCode: '0800',
|
|
1139
|
+
// accountNumber: '3456789012',
|
|
1140
|
+
// production: false,
|
|
1141
|
+
// },
|
|
1142
|
+
// ],
|
|
1143
|
+
// productionAccounts: [
|
|
1144
|
+
// // Banka CREDITAS (2250)
|
|
1145
|
+
// {
|
|
1146
|
+
// connectorKey: 'CREDITAS',
|
|
1147
|
+
// id: '2250-CZK',
|
|
1148
|
+
// identification: {
|
|
1149
|
+
// number: '100602391',
|
|
1150
|
+
// bankCode: '2250',
|
|
1151
|
+
// iban: 'CZ5122500000000100602391',
|
|
1152
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1153
|
+
// },
|
|
1154
|
+
// fallbackLastSync: monthAgo,
|
|
1155
|
+
// currency: 'CZK',
|
|
1156
|
+
// production: true,
|
|
1157
|
+
// },
|
|
1158
|
+
// {
|
|
1159
|
+
// connectorKey: 'CREDITAS',
|
|
1160
|
+
// id: '2250-EUR',
|
|
1161
|
+
// identification: {
|
|
1162
|
+
// number: '100602404',
|
|
1163
|
+
// bankCode: '2250',
|
|
1164
|
+
// iban: 'CZ8822500000000100602404',
|
|
1165
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1166
|
+
// },
|
|
1167
|
+
// fallbackLastSync: monthAgo,
|
|
1168
|
+
// currency: 'EUR',
|
|
1169
|
+
// production: true,
|
|
1170
|
+
// },
|
|
1171
|
+
// {
|
|
1172
|
+
// connectorKey: 'CREDITAS',
|
|
1173
|
+
// id: '2250-USD',
|
|
1174
|
+
// identification: {
|
|
1175
|
+
// number: '100602412',
|
|
1176
|
+
// bankCode: '2250',
|
|
1177
|
+
// iban: 'CZ6622500000000100602412',
|
|
1178
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1179
|
+
// },
|
|
1180
|
+
// fallbackLastSync: monthAgo,
|
|
1181
|
+
// currency: 'USD',
|
|
1182
|
+
// production: true,
|
|
1183
|
+
// },
|
|
1184
|
+
// {
|
|
1185
|
+
// connectorKey: 'CREDITAS',
|
|
1186
|
+
// id: '2250-GBP',
|
|
1187
|
+
// identification: {
|
|
1188
|
+
// number: '100602420',
|
|
1189
|
+
// bankCode: '2250',
|
|
1190
|
+
// iban: 'CZ4422500000000100602420',
|
|
1191
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1192
|
+
// },
|
|
1193
|
+
// fallbackLastSync: monthAgo,
|
|
1194
|
+
// currency: 'GBP',
|
|
1195
|
+
// production: true,
|
|
1196
|
+
// },
|
|
1197
|
+
// {
|
|
1198
|
+
// connectorKey: 'CREDITAS',
|
|
1199
|
+
// id: '2250-CHF',
|
|
1200
|
+
// identification: {
|
|
1201
|
+
// number: '100602439',
|
|
1202
|
+
// bankCode: '2250',
|
|
1203
|
+
// iban: 'CZ1622500000000100602439',
|
|
1204
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1205
|
+
// },
|
|
1206
|
+
// fallbackLastSync: monthAgo,
|
|
1207
|
+
// currency: 'CHF',
|
|
1208
|
+
// production: true,
|
|
1209
|
+
// },
|
|
1210
|
+
// {
|
|
1211
|
+
// connectorKey: 'CREDITAS',
|
|
1212
|
+
// id: '2250-PLN',
|
|
1213
|
+
// identification: {
|
|
1214
|
+
// number: '100602447',
|
|
1215
|
+
// bankCode: '2250',
|
|
1216
|
+
// iban: 'CZ9122500000000100602447',
|
|
1217
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1218
|
+
// },
|
|
1219
|
+
// fallbackLastSync: monthAgo,
|
|
1220
|
+
// currency: 'PLN',
|
|
1221
|
+
// production: true,
|
|
1222
|
+
// },
|
|
1223
|
+
// // Fio banka (2010)
|
|
1224
|
+
// {
|
|
1225
|
+
// connectorKey: 'FINBRICKS',
|
|
1226
|
+
// id: '2010-CZK',
|
|
1227
|
+
// identification: {
|
|
1228
|
+
// number: '2500845869',
|
|
1229
|
+
// bankCode: '2010',
|
|
1230
|
+
// iban: 'CZ0420100000002500845869',
|
|
1231
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1232
|
+
// },
|
|
1233
|
+
// fallbackLastSync: monthAgo,
|
|
1234
|
+
// currency: 'CZK',
|
|
1235
|
+
// production: true,
|
|
1236
|
+
// },
|
|
1237
|
+
// {
|
|
1238
|
+
// connectorKey: 'FINBRICKS',
|
|
1239
|
+
// id: '2010-EUR',
|
|
1240
|
+
// identification: {
|
|
1241
|
+
// number: '2600884128',
|
|
1242
|
+
// bankCode: '2010',
|
|
1243
|
+
// iban: 'CZ0820100000002600884128',
|
|
1244
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1245
|
+
// },
|
|
1246
|
+
// fallbackLastSync: monthAgo,
|
|
1247
|
+
// currency: 'EUR',
|
|
1248
|
+
// production: true,
|
|
1249
|
+
// },
|
|
1250
|
+
// {
|
|
1251
|
+
// connectorKey: 'FINBRICKS',
|
|
1252
|
+
// id: '2010-USD',
|
|
1253
|
+
// identification: {
|
|
1254
|
+
// number: '2700884133',
|
|
1255
|
+
// bankCode: '2010',
|
|
1256
|
+
// iban: 'CZ1420100000002700884133',
|
|
1257
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1258
|
+
// },
|
|
1259
|
+
// fallbackLastSync: monthAgo,
|
|
1260
|
+
// currency: 'USD',
|
|
1261
|
+
// production: true,
|
|
1262
|
+
// },
|
|
1263
|
+
// {
|
|
1264
|
+
// connectorKey: 'FINBRICKS',
|
|
1265
|
+
// id: '2010-CHF',
|
|
1266
|
+
// identification: {
|
|
1267
|
+
// number: '2401098351',
|
|
1268
|
+
// bankCode: '2010',
|
|
1269
|
+
// iban: 'CZ0920100000002401098351',
|
|
1270
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1271
|
+
// },
|
|
1272
|
+
// fallbackLastSync: monthAgo,
|
|
1273
|
+
// currency: 'CHF',
|
|
1274
|
+
// production: true,
|
|
1275
|
+
// },
|
|
1276
|
+
// {
|
|
1277
|
+
// connectorKey: 'FINBRICKS',
|
|
1278
|
+
// id: '2010-GBP',
|
|
1279
|
+
// identification: {
|
|
1280
|
+
// number: '2400884131',
|
|
1281
|
+
// bankCode: '2010',
|
|
1282
|
+
// iban: 'CZ3320100000002400884131',
|
|
1283
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1284
|
+
// },
|
|
1285
|
+
// fallbackLastSync: monthAgo,
|
|
1286
|
+
// currency: 'GBP',
|
|
1287
|
+
// production: true,
|
|
1288
|
+
// },
|
|
1289
|
+
// {
|
|
1290
|
+
// connectorKey: 'FINBRICKS',
|
|
1291
|
+
// id: '2010-PLN',
|
|
1292
|
+
// identification: {
|
|
1293
|
+
// number: '2701098353',
|
|
1294
|
+
// bankCode: '2010',
|
|
1295
|
+
// iban: 'CZ8720100000002701098353',
|
|
1296
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1297
|
+
// },
|
|
1298
|
+
// fallbackLastSync: monthAgo,
|
|
1299
|
+
// currency: 'PLN',
|
|
1300
|
+
// production: true,
|
|
1301
|
+
// },
|
|
1302
|
+
// {
|
|
1303
|
+
// connectorKey: 'FINBRICKS',
|
|
1304
|
+
// id: '2010-CAD',
|
|
1305
|
+
// identification: {
|
|
1306
|
+
// number: '2701478102',
|
|
1307
|
+
// bankCode: '2010',
|
|
1308
|
+
// iban: 'CZ5520100000002701478102',
|
|
1309
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1310
|
+
// },
|
|
1311
|
+
// fallbackLastSync: monthAgo,
|
|
1312
|
+
// currency: 'CAD',
|
|
1313
|
+
// production: true,
|
|
1314
|
+
// },
|
|
1315
|
+
// // Komerční banka (0100)
|
|
1316
|
+
// {
|
|
1317
|
+
// connectorKey: 'FINBRICKS',
|
|
1318
|
+
// id: '0100-CZK',
|
|
1319
|
+
// identification: {
|
|
1320
|
+
// number: '115-1483630297',
|
|
1321
|
+
// bankCode: '0100',
|
|
1322
|
+
// iban: 'CZ5901000001151483630297',
|
|
1323
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1324
|
+
// },
|
|
1325
|
+
// fallbackLastSync: monthAgo,
|
|
1326
|
+
// currency: 'CZK',
|
|
1327
|
+
// production: true,
|
|
1328
|
+
// },
|
|
1329
|
+
// {
|
|
1330
|
+
// connectorKey: 'FINBRICKS',
|
|
1331
|
+
// id: '0100-EUR',
|
|
1332
|
+
// identification: {
|
|
1333
|
+
// number: '115-1484940297',
|
|
1334
|
+
// bankCode: '0100',
|
|
1335
|
+
// iban: 'CZ4201000001151484940297',
|
|
1336
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1337
|
+
// },
|
|
1338
|
+
// fallbackLastSync: monthAgo,
|
|
1339
|
+
// currency: 'EUR',
|
|
1340
|
+
// production: true,
|
|
1341
|
+
// },
|
|
1342
|
+
// {
|
|
1343
|
+
// connectorKey: 'FINBRICKS',
|
|
1344
|
+
// id: '0100-USD',
|
|
1345
|
+
// identification: {
|
|
1346
|
+
// number: '115-1483960237',
|
|
1347
|
+
// bankCode: '0100',
|
|
1348
|
+
// iban: 'CZ6201000001151483960237',
|
|
1349
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1350
|
+
// },
|
|
1351
|
+
// fallbackLastSync: monthAgo,
|
|
1352
|
+
// currency: 'USD',
|
|
1353
|
+
// production: true,
|
|
1354
|
+
// },
|
|
1355
|
+
// {
|
|
1356
|
+
// connectorKey: 'FINBRICKS',
|
|
1357
|
+
// id: '0100-PLN',
|
|
1358
|
+
// identification: {
|
|
1359
|
+
// number: '115-6674290267',
|
|
1360
|
+
// bankCode: '0100',
|
|
1361
|
+
// iban: 'CZ3501000001156674290267',
|
|
1362
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1363
|
+
// },
|
|
1364
|
+
// fallbackLastSync: monthAgo,
|
|
1365
|
+
// currency: 'PLN',
|
|
1366
|
+
// production: true,
|
|
1367
|
+
// },
|
|
1368
|
+
// {
|
|
1369
|
+
// connectorKey: 'FINBRICKS',
|
|
1370
|
+
// id: '0100-SEK',
|
|
1371
|
+
// identification: {
|
|
1372
|
+
// number: '115-9578110207',
|
|
1373
|
+
// bankCode: '0100',
|
|
1374
|
+
// iban: 'CZ2401000001159578110207',
|
|
1375
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1376
|
+
// },
|
|
1377
|
+
// fallbackLastSync: monthAgo,
|
|
1378
|
+
// currency: 'SEK',
|
|
1379
|
+
// production: true,
|
|
1380
|
+
// },
|
|
1381
|
+
// // Česká spořitelna (0800)
|
|
1382
|
+
// {
|
|
1383
|
+
// connectorKey: 'ERSTE',
|
|
1384
|
+
// id: '0800-CZK',
|
|
1385
|
+
// identification: {
|
|
1386
|
+
// number: '4413926379',
|
|
1387
|
+
// bankCode: '0800',
|
|
1388
|
+
// iban: 'CZ7908000000004413926379',
|
|
1389
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1390
|
+
// },
|
|
1391
|
+
// fallbackLastSync: monthAgo,
|
|
1392
|
+
// currency: 'CZK',
|
|
1393
|
+
// production: true,
|
|
1394
|
+
// },
|
|
1395
|
+
// {
|
|
1396
|
+
// connectorKey: 'ERSTE',
|
|
1397
|
+
// id: '0800-EUR',
|
|
1398
|
+
// identification: {
|
|
1399
|
+
// number: '1966646293',
|
|
1400
|
+
// bankCode: '0800',
|
|
1401
|
+
// iban: 'CZ2308000000001966646293',
|
|
1402
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1403
|
+
// },
|
|
1404
|
+
// fallbackLastSync: monthAgo,
|
|
1405
|
+
// currency: 'EUR',
|
|
1406
|
+
// production: true,
|
|
1407
|
+
// },
|
|
1408
|
+
// {
|
|
1409
|
+
// connectorKey: 'ERSTE',
|
|
1410
|
+
// id: '0800-USD',
|
|
1411
|
+
// identification: {
|
|
1412
|
+
// number: '1978982243',
|
|
1413
|
+
// bankCode: '0800',
|
|
1414
|
+
// iban: 'CZ1908000000001978982243',
|
|
1415
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1416
|
+
// },
|
|
1417
|
+
// fallbackLastSync: monthAgo,
|
|
1418
|
+
// currency: 'USD',
|
|
1419
|
+
// production: true,
|
|
1420
|
+
// },
|
|
1421
|
+
// {
|
|
1422
|
+
// connectorKey: 'ERSTE',
|
|
1423
|
+
// id: '0800-HUF',
|
|
1424
|
+
// identification: {
|
|
1425
|
+
// number: '13461252',
|
|
1426
|
+
// bankCode: '0800',
|
|
1427
|
+
// iban: 'CZ1908000000000013461252',
|
|
1428
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1429
|
+
// },
|
|
1430
|
+
// fallbackLastSync: monthAgo,
|
|
1431
|
+
// currency: 'HUF',
|
|
1432
|
+
// production: true,
|
|
1433
|
+
// },
|
|
1434
|
+
// // MONETA Money Bank (0600)
|
|
1435
|
+
// {
|
|
1436
|
+
// connectorKey: 'FINBRICKS',
|
|
1437
|
+
// id: '0600-CZK',
|
|
1438
|
+
// identification: {
|
|
1439
|
+
// number: '224252186',
|
|
1440
|
+
// bankCode: '0600',
|
|
1441
|
+
// iban: 'CZ5906000000000224252186',
|
|
1442
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1443
|
+
// },
|
|
1444
|
+
// fallbackLastSync: monthAgo,
|
|
1445
|
+
// currency: 'CZK',
|
|
1446
|
+
// production: true,
|
|
1447
|
+
// },
|
|
1448
|
+
// {
|
|
1449
|
+
// connectorKey: 'FINBRICKS',
|
|
1450
|
+
// id: '0600-EUR',
|
|
1451
|
+
// identification: {
|
|
1452
|
+
// number: '224252231',
|
|
1453
|
+
// bankCode: '0600',
|
|
1454
|
+
// iban: 'CZ0806000000000224252231',
|
|
1455
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1456
|
+
// },
|
|
1457
|
+
// fallbackLastSync: monthAgo,
|
|
1458
|
+
// currency: 'EUR',
|
|
1459
|
+
// production: true,
|
|
1460
|
+
// },
|
|
1461
|
+
// {
|
|
1462
|
+
// connectorKey: 'FINBRICKS',
|
|
1463
|
+
// id: '0600-USD',
|
|
1464
|
+
// identification: {
|
|
1465
|
+
// number: '224252290',
|
|
1466
|
+
// bankCode: '0600',
|
|
1467
|
+
// iban: 'CZ6406000000000224252290',
|
|
1468
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1469
|
+
// },
|
|
1470
|
+
// fallbackLastSync: monthAgo,
|
|
1471
|
+
// currency: 'USD',
|
|
1472
|
+
// production: true,
|
|
1473
|
+
// },
|
|
1474
|
+
// // NEY spořitelní družstvo (2260)
|
|
1475
|
+
// {
|
|
1476
|
+
// connectorKey: 'FINBRICKS',
|
|
1477
|
+
// id: '2260-CZK',
|
|
1478
|
+
// identification: {
|
|
1479
|
+
// number: '1702700014',
|
|
1480
|
+
// bankCode: '2260',
|
|
1481
|
+
// iban: 'CZ7422600000001702700014',
|
|
1482
|
+
// holderName: 'Devizová Burza a.s.',
|
|
1483
|
+
// },
|
|
1484
|
+
// fallbackLastSync: monthAgo,
|
|
1485
|
+
// currency: 'CZK',
|
|
1486
|
+
// production: true,
|
|
1487
|
+
// },
|
|
1488
|
+
// ],
|
|
1302
1489
|
}
|
|
1303
1490
|
});
|
|
1304
1491
|
|