@develit-services/bank 0.0.7 → 0.0.9

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.
@@ -66,423 +66,6 @@ const getBatchesInputSchema = zod.z.object({
66
66
  offset: zod.z.number().min(0).optional().default(0)
67
67
  });
68
68
 
69
- const monthAgo = new Date(
70
- Date.now() - 30 * 24 * 60 * 60 * 1e3
71
- // 30 days ago
72
- );
73
- const stagingAccounts = [
74
- {
75
- connectorKey: "MOCK_COBS",
76
- id: "staging-czk",
77
- identification: {
78
- number: "1234567890",
79
- bankCode: "5051",
80
- iban: "CZ0350510000000000000449",
81
- holderName: "Devizov\xE1 Burza a.s."
82
- },
83
- fallbackLastSync: monthAgo,
84
- currency: "CZK",
85
- production: false
86
- },
87
- {
88
- connectorKey: "MOCK_COBS",
89
- id: "staging-eur",
90
- identification: {
91
- number: "2345678901",
92
- bankCode: "5051",
93
- iban: "CZ0750510000000000000668",
94
- holderName: "Devizov\xE1 Burza a.s."
95
- },
96
- fallbackLastSync: monthAgo,
97
- currency: "EUR",
98
- production: false
99
- },
100
- {
101
- connectorKey: "FIO",
102
- id: "kleinpetr-test",
103
- identification: {
104
- number: "2502130437",
105
- bankCode: "2010",
106
- iban: "CZ8520100000002502130437",
107
- holderName: "Petr Klein"
108
- },
109
- fallbackLastSync: monthAgo,
110
- currency: "CZK",
111
- production: true
112
- },
113
- {
114
- connectorKey: "MOCK",
115
- id: "id-test",
116
- identification: {
117
- number: "777777777",
118
- bankCode: "0800",
119
- iban: "PL0000000000002444430437",
120
- holderName: "Test Test"
121
- },
122
- fallbackLastSync: monthAgo,
123
- currency: "PLN",
124
- production: false
125
- }
126
- // {
127
- // connectorKey: 'MOCK_COBS',
128
- // id: 'staging-usd',
129
- // identification: {
130
- // iban: 'CZ3456789012345678901234',
131
- // accountNumberWithBankCode: '3456789012/3456',
132
- // },
133
- // currency: 'USD',
134
- // bankCode: '0800',
135
- // accountNumber: '3456789012',
136
- // production: false,
137
- // },
138
- ];
139
- const productionAccounts = [
140
- // Banka CREDITAS (2250)
141
- {
142
- connectorKey: "CREDITAS",
143
- id: "2250-CZK",
144
- identification: {
145
- number: "100602391",
146
- bankCode: "2250",
147
- iban: "CZ5122500000000100602391",
148
- holderName: "Devizov\xE1 Burza a.s."
149
- },
150
- fallbackLastSync: monthAgo,
151
- currency: "CZK",
152
- production: true
153
- },
154
- {
155
- connectorKey: "CREDITAS",
156
- id: "2250-EUR",
157
- identification: {
158
- number: "100602404",
159
- bankCode: "2250",
160
- iban: "CZ8822500000000100602404",
161
- holderName: "Devizov\xE1 Burza a.s."
162
- },
163
- fallbackLastSync: monthAgo,
164
- currency: "EUR",
165
- production: true
166
- },
167
- {
168
- connectorKey: "CREDITAS",
169
- id: "2250-USD",
170
- identification: {
171
- number: "100602412",
172
- bankCode: "2250",
173
- iban: "CZ6622500000000100602412",
174
- holderName: "Devizov\xE1 Burza a.s."
175
- },
176
- fallbackLastSync: monthAgo,
177
- currency: "USD",
178
- production: true
179
- },
180
- {
181
- connectorKey: "CREDITAS",
182
- id: "2250-GBP",
183
- identification: {
184
- number: "100602420",
185
- bankCode: "2250",
186
- iban: "CZ4422500000000100602420",
187
- holderName: "Devizov\xE1 Burza a.s."
188
- },
189
- fallbackLastSync: monthAgo,
190
- currency: "GBP",
191
- production: true
192
- },
193
- {
194
- connectorKey: "CREDITAS",
195
- id: "2250-CHF",
196
- identification: {
197
- number: "100602439",
198
- bankCode: "2250",
199
- iban: "CZ1622500000000100602439",
200
- holderName: "Devizov\xE1 Burza a.s."
201
- },
202
- fallbackLastSync: monthAgo,
203
- currency: "CHF",
204
- production: true
205
- },
206
- {
207
- connectorKey: "CREDITAS",
208
- id: "2250-PLN",
209
- identification: {
210
- number: "100602447",
211
- bankCode: "2250",
212
- iban: "CZ9122500000000100602447",
213
- holderName: "Devizov\xE1 Burza a.s."
214
- },
215
- fallbackLastSync: monthAgo,
216
- currency: "PLN",
217
- production: true
218
- },
219
- // Fio banka (2010)
220
- {
221
- connectorKey: "FINBRICKS",
222
- id: "2010-CZK",
223
- identification: {
224
- number: "2500845869",
225
- bankCode: "2010",
226
- iban: "CZ0420100000002500845869",
227
- holderName: "Devizov\xE1 Burza a.s."
228
- },
229
- fallbackLastSync: monthAgo,
230
- currency: "CZK",
231
- production: true
232
- },
233
- {
234
- connectorKey: "FINBRICKS",
235
- id: "2010-EUR",
236
- identification: {
237
- number: "2600884128",
238
- bankCode: "2010",
239
- iban: "CZ0820100000002600884128",
240
- holderName: "Devizov\xE1 Burza a.s."
241
- },
242
- fallbackLastSync: monthAgo,
243
- currency: "EUR",
244
- production: true
245
- },
246
- {
247
- connectorKey: "FINBRICKS",
248
- id: "2010-USD",
249
- identification: {
250
- number: "2700884133",
251
- bankCode: "2010",
252
- iban: "CZ1420100000002700884133",
253
- holderName: "Devizov\xE1 Burza a.s."
254
- },
255
- fallbackLastSync: monthAgo,
256
- currency: "USD",
257
- production: true
258
- },
259
- {
260
- connectorKey: "FINBRICKS",
261
- id: "2010-CHF",
262
- identification: {
263
- number: "2401098351",
264
- bankCode: "2010",
265
- iban: "CZ0920100000002401098351",
266
- holderName: "Devizov\xE1 Burza a.s."
267
- },
268
- fallbackLastSync: monthAgo,
269
- currency: "CHF",
270
- production: true
271
- },
272
- {
273
- connectorKey: "FINBRICKS",
274
- id: "2010-GBP",
275
- identification: {
276
- number: "2400884131",
277
- bankCode: "2010",
278
- iban: "CZ3320100000002400884131",
279
- holderName: "Devizov\xE1 Burza a.s."
280
- },
281
- fallbackLastSync: monthAgo,
282
- currency: "GBP",
283
- production: true
284
- },
285
- {
286
- connectorKey: "FINBRICKS",
287
- id: "2010-PLN",
288
- identification: {
289
- number: "2701098353",
290
- bankCode: "2010",
291
- iban: "CZ8720100000002701098353",
292
- holderName: "Devizov\xE1 Burza a.s."
293
- },
294
- fallbackLastSync: monthAgo,
295
- currency: "PLN",
296
- production: true
297
- },
298
- {
299
- connectorKey: "FINBRICKS",
300
- id: "2010-CAD",
301
- identification: {
302
- number: "2701478102",
303
- bankCode: "2010",
304
- iban: "CZ5520100000002701478102",
305
- holderName: "Devizov\xE1 Burza a.s."
306
- },
307
- fallbackLastSync: monthAgo,
308
- currency: "CAD",
309
- production: true
310
- },
311
- // Komerční banka (0100)
312
- {
313
- connectorKey: "FINBRICKS",
314
- id: "0100-CZK",
315
- identification: {
316
- number: "115-1483630297",
317
- bankCode: "0100",
318
- iban: "CZ5901000001151483630297",
319
- holderName: "Devizov\xE1 Burza a.s."
320
- },
321
- fallbackLastSync: monthAgo,
322
- currency: "CZK",
323
- production: true
324
- },
325
- {
326
- connectorKey: "FINBRICKS",
327
- id: "0100-EUR",
328
- identification: {
329
- number: "115-1484940297",
330
- bankCode: "0100",
331
- iban: "CZ4201000001151484940297",
332
- holderName: "Devizov\xE1 Burza a.s."
333
- },
334
- fallbackLastSync: monthAgo,
335
- currency: "EUR",
336
- production: true
337
- },
338
- {
339
- connectorKey: "FINBRICKS",
340
- id: "0100-USD",
341
- identification: {
342
- number: "115-1483960237",
343
- bankCode: "0100",
344
- iban: "CZ6201000001151483960237",
345
- holderName: "Devizov\xE1 Burza a.s."
346
- },
347
- fallbackLastSync: monthAgo,
348
- currency: "USD",
349
- production: true
350
- },
351
- {
352
- connectorKey: "FINBRICKS",
353
- id: "0100-PLN",
354
- identification: {
355
- number: "115-6674290267",
356
- bankCode: "0100",
357
- iban: "CZ3501000001156674290267",
358
- holderName: "Devizov\xE1 Burza a.s."
359
- },
360
- fallbackLastSync: monthAgo,
361
- currency: "PLN",
362
- production: true
363
- },
364
- {
365
- connectorKey: "FINBRICKS",
366
- id: "0100-SEK",
367
- identification: {
368
- number: "115-9578110207",
369
- bankCode: "0100",
370
- iban: "CZ2401000001159578110207",
371
- holderName: "Devizov\xE1 Burza a.s."
372
- },
373
- fallbackLastSync: monthAgo,
374
- currency: "SEK",
375
- production: true
376
- },
377
- // Česká spořitelna (0800)
378
- {
379
- connectorKey: "ERSTE",
380
- id: "0800-CZK",
381
- identification: {
382
- number: "4413926379",
383
- bankCode: "0800",
384
- iban: "CZ7908000000004413926379",
385
- holderName: "Devizov\xE1 Burza a.s."
386
- },
387
- fallbackLastSync: monthAgo,
388
- currency: "CZK",
389
- production: true
390
- },
391
- {
392
- connectorKey: "ERSTE",
393
- id: "0800-EUR",
394
- identification: {
395
- number: "1966646293",
396
- bankCode: "0800",
397
- iban: "CZ2308000000001966646293",
398
- holderName: "Devizov\xE1 Burza a.s."
399
- },
400
- fallbackLastSync: monthAgo,
401
- currency: "EUR",
402
- production: true
403
- },
404
- {
405
- connectorKey: "ERSTE",
406
- id: "0800-USD",
407
- identification: {
408
- number: "1978982243",
409
- bankCode: "0800",
410
- iban: "CZ1908000000001978982243",
411
- holderName: "Devizov\xE1 Burza a.s."
412
- },
413
- fallbackLastSync: monthAgo,
414
- currency: "USD",
415
- production: true
416
- },
417
- {
418
- connectorKey: "ERSTE",
419
- id: "0800-HUF",
420
- identification: {
421
- number: "13461252",
422
- bankCode: "0800",
423
- iban: "CZ1908000000000013461252",
424
- holderName: "Devizov\xE1 Burza a.s."
425
- },
426
- fallbackLastSync: monthAgo,
427
- currency: "HUF",
428
- production: true
429
- },
430
- // MONETA Money Bank (0600)
431
- {
432
- connectorKey: "FINBRICKS",
433
- id: "0600-CZK",
434
- identification: {
435
- number: "224252186",
436
- bankCode: "0600",
437
- iban: "CZ5906000000000224252186",
438
- holderName: "Devizov\xE1 Burza a.s."
439
- },
440
- fallbackLastSync: monthAgo,
441
- currency: "CZK",
442
- production: true
443
- },
444
- {
445
- connectorKey: "FINBRICKS",
446
- id: "0600-EUR",
447
- identification: {
448
- number: "224252231",
449
- bankCode: "0600",
450
- iban: "CZ0806000000000224252231",
451
- holderName: "Devizov\xE1 Burza a.s."
452
- },
453
- fallbackLastSync: monthAgo,
454
- currency: "EUR",
455
- production: true
456
- },
457
- {
458
- connectorKey: "FINBRICKS",
459
- id: "0600-USD",
460
- identification: {
461
- number: "224252290",
462
- bankCode: "0600",
463
- iban: "CZ6406000000000224252290",
464
- holderName: "Devizov\xE1 Burza a.s."
465
- },
466
- fallbackLastSync: monthAgo,
467
- currency: "USD",
468
- production: true
469
- },
470
- // NEY spořitelní družstvo (2260)
471
- {
472
- connectorKey: "FINBRICKS",
473
- id: "2260-CZK",
474
- identification: {
475
- number: "1702700014",
476
- bankCode: "2260",
477
- iban: "CZ7422600000001702700014",
478
- holderName: "Devizov\xE1 Burza a.s."
479
- },
480
- fallbackLastSync: monthAgo,
481
- currency: "CZK",
482
- production: true
483
- }
484
- ];
485
-
486
69
  const createPaymentCommand = (db$1, { payment }) => {
487
70
  return {
488
71
  command: db$1.insert(db.tables.payment).values(payment).returning()
@@ -643,13 +226,14 @@ var __decorateClass = (decorators, target, key, kind) => {
643
226
  return result;
644
227
  };
645
228
  class BankServiceBase extends backendSdk.develitWorker(cloudflare_workers.WorkerEntrypoint) {
646
- constructor(ctx, env) {
229
+ constructor(ctx, env, configAccounts) {
647
230
  super(ctx, env);
648
231
  this.name = "bank-service";
232
+ this.configAccounts = configAccounts;
649
233
  this.db = d1.drizzle(this.env.BANK_D1, { schema: db.tables });
650
234
  }
651
235
  get accounts() {
652
- return this.env.ENVIRONMENT === "production" ? productionAccounts : stagingAccounts;
236
+ return this.env.ENVIRONMENT === "production" ? this.configAccounts.productionAccounts : this.configAccounts.stagingAccounts;
653
237
  }
654
238
  accountFetchInterval(connectorKey) {
655
239
  switch (connectorKey) {
@@ -1212,11 +796,432 @@ __decorateClass([
1212
796
  ], BankServiceBase.prototype, "getBatches");
1213
797
  function defineBankService() {
1214
798
  return class BankService extends BankServiceBase {
1215
- constructor(ctx, env) {
1216
- super(ctx, env);
799
+ constructor(ctx, env, configAccounts) {
800
+ super(
801
+ ctx,
802
+ env,
803
+ configAccounts || {
804
+ stagingAccounts: [
805
+ {
806
+ connectorKey: "MOCK_COBS",
807
+ id: "staging-czk",
808
+ identification: {
809
+ number: "1234567890",
810
+ bankCode: "5051",
811
+ iban: "CZ0350510000000000000449",
812
+ holderName: "Devizov\xE1 Burza a.s."
813
+ },
814
+ fallbackLastSync: monthAgo,
815
+ currency: "CZK",
816
+ production: false
817
+ },
818
+ {
819
+ connectorKey: "MOCK_COBS",
820
+ id: "staging-eur",
821
+ identification: {
822
+ number: "2345678901",
823
+ bankCode: "5051",
824
+ iban: "CZ0750510000000000000668",
825
+ holderName: "Devizov\xE1 Burza a.s."
826
+ },
827
+ fallbackLastSync: monthAgo,
828
+ currency: "EUR",
829
+ production: false
830
+ },
831
+ {
832
+ connectorKey: "FIO",
833
+ id: "kleinpetr-test",
834
+ identification: {
835
+ number: "2502130437",
836
+ bankCode: "2010",
837
+ iban: "CZ8520100000002502130437",
838
+ holderName: "Petr Klein"
839
+ },
840
+ fallbackLastSync: monthAgo,
841
+ currency: "CZK",
842
+ production: true
843
+ },
844
+ {
845
+ connectorKey: "MOCK",
846
+ id: "id-test",
847
+ identification: {
848
+ number: "777777777",
849
+ bankCode: "0800",
850
+ iban: "PL0000000000002444430437",
851
+ holderName: "Test Test"
852
+ },
853
+ fallbackLastSync: monthAgo,
854
+ currency: "PLN",
855
+ production: false
856
+ }
857
+ // {
858
+ // connectorKey: 'MOCK_COBS',
859
+ // id: 'staging-usd',
860
+ // identification: {
861
+ // iban: 'CZ3456789012345678901234',
862
+ // accountNumberWithBankCode: '3456789012/3456',
863
+ // },
864
+ // currency: 'USD',
865
+ // bankCode: '0800',
866
+ // accountNumber: '3456789012',
867
+ // production: false,
868
+ // },
869
+ ],
870
+ productionAccounts: [
871
+ // Banka CREDITAS (2250)
872
+ {
873
+ connectorKey: "CREDITAS",
874
+ id: "2250-CZK",
875
+ identification: {
876
+ number: "100602391",
877
+ bankCode: "2250",
878
+ iban: "CZ5122500000000100602391",
879
+ holderName: "Devizov\xE1 Burza a.s."
880
+ },
881
+ fallbackLastSync: monthAgo,
882
+ currency: "CZK",
883
+ production: true
884
+ },
885
+ {
886
+ connectorKey: "CREDITAS",
887
+ id: "2250-EUR",
888
+ identification: {
889
+ number: "100602404",
890
+ bankCode: "2250",
891
+ iban: "CZ8822500000000100602404",
892
+ holderName: "Devizov\xE1 Burza a.s."
893
+ },
894
+ fallbackLastSync: monthAgo,
895
+ currency: "EUR",
896
+ production: true
897
+ },
898
+ {
899
+ connectorKey: "CREDITAS",
900
+ id: "2250-USD",
901
+ identification: {
902
+ number: "100602412",
903
+ bankCode: "2250",
904
+ iban: "CZ6622500000000100602412",
905
+ holderName: "Devizov\xE1 Burza a.s."
906
+ },
907
+ fallbackLastSync: monthAgo,
908
+ currency: "USD",
909
+ production: true
910
+ },
911
+ {
912
+ connectorKey: "CREDITAS",
913
+ id: "2250-GBP",
914
+ identification: {
915
+ number: "100602420",
916
+ bankCode: "2250",
917
+ iban: "CZ4422500000000100602420",
918
+ holderName: "Devizov\xE1 Burza a.s."
919
+ },
920
+ fallbackLastSync: monthAgo,
921
+ currency: "GBP",
922
+ production: true
923
+ },
924
+ {
925
+ connectorKey: "CREDITAS",
926
+ id: "2250-CHF",
927
+ identification: {
928
+ number: "100602439",
929
+ bankCode: "2250",
930
+ iban: "CZ1622500000000100602439",
931
+ holderName: "Devizov\xE1 Burza a.s."
932
+ },
933
+ fallbackLastSync: monthAgo,
934
+ currency: "CHF",
935
+ production: true
936
+ },
937
+ {
938
+ connectorKey: "CREDITAS",
939
+ id: "2250-PLN",
940
+ identification: {
941
+ number: "100602447",
942
+ bankCode: "2250",
943
+ iban: "CZ9122500000000100602447",
944
+ holderName: "Devizov\xE1 Burza a.s."
945
+ },
946
+ fallbackLastSync: monthAgo,
947
+ currency: "PLN",
948
+ production: true
949
+ },
950
+ // Fio banka (2010)
951
+ {
952
+ connectorKey: "FINBRICKS",
953
+ id: "2010-CZK",
954
+ identification: {
955
+ number: "2500845869",
956
+ bankCode: "2010",
957
+ iban: "CZ0420100000002500845869",
958
+ holderName: "Devizov\xE1 Burza a.s."
959
+ },
960
+ fallbackLastSync: monthAgo,
961
+ currency: "CZK",
962
+ production: true
963
+ },
964
+ {
965
+ connectorKey: "FINBRICKS",
966
+ id: "2010-EUR",
967
+ identification: {
968
+ number: "2600884128",
969
+ bankCode: "2010",
970
+ iban: "CZ0820100000002600884128",
971
+ holderName: "Devizov\xE1 Burza a.s."
972
+ },
973
+ fallbackLastSync: monthAgo,
974
+ currency: "EUR",
975
+ production: true
976
+ },
977
+ {
978
+ connectorKey: "FINBRICKS",
979
+ id: "2010-USD",
980
+ identification: {
981
+ number: "2700884133",
982
+ bankCode: "2010",
983
+ iban: "CZ1420100000002700884133",
984
+ holderName: "Devizov\xE1 Burza a.s."
985
+ },
986
+ fallbackLastSync: monthAgo,
987
+ currency: "USD",
988
+ production: true
989
+ },
990
+ {
991
+ connectorKey: "FINBRICKS",
992
+ id: "2010-CHF",
993
+ identification: {
994
+ number: "2401098351",
995
+ bankCode: "2010",
996
+ iban: "CZ0920100000002401098351",
997
+ holderName: "Devizov\xE1 Burza a.s."
998
+ },
999
+ fallbackLastSync: monthAgo,
1000
+ currency: "CHF",
1001
+ production: true
1002
+ },
1003
+ {
1004
+ connectorKey: "FINBRICKS",
1005
+ id: "2010-GBP",
1006
+ identification: {
1007
+ number: "2400884131",
1008
+ bankCode: "2010",
1009
+ iban: "CZ3320100000002400884131",
1010
+ holderName: "Devizov\xE1 Burza a.s."
1011
+ },
1012
+ fallbackLastSync: monthAgo,
1013
+ currency: "GBP",
1014
+ production: true
1015
+ },
1016
+ {
1017
+ connectorKey: "FINBRICKS",
1018
+ id: "2010-PLN",
1019
+ identification: {
1020
+ number: "2701098353",
1021
+ bankCode: "2010",
1022
+ iban: "CZ8720100000002701098353",
1023
+ holderName: "Devizov\xE1 Burza a.s."
1024
+ },
1025
+ fallbackLastSync: monthAgo,
1026
+ currency: "PLN",
1027
+ production: true
1028
+ },
1029
+ {
1030
+ connectorKey: "FINBRICKS",
1031
+ id: "2010-CAD",
1032
+ identification: {
1033
+ number: "2701478102",
1034
+ bankCode: "2010",
1035
+ iban: "CZ5520100000002701478102",
1036
+ holderName: "Devizov\xE1 Burza a.s."
1037
+ },
1038
+ fallbackLastSync: monthAgo,
1039
+ currency: "CAD",
1040
+ production: true
1041
+ },
1042
+ // Komerční banka (0100)
1043
+ {
1044
+ connectorKey: "FINBRICKS",
1045
+ id: "0100-CZK",
1046
+ identification: {
1047
+ number: "115-1483630297",
1048
+ bankCode: "0100",
1049
+ iban: "CZ5901000001151483630297",
1050
+ holderName: "Devizov\xE1 Burza a.s."
1051
+ },
1052
+ fallbackLastSync: monthAgo,
1053
+ currency: "CZK",
1054
+ production: true
1055
+ },
1056
+ {
1057
+ connectorKey: "FINBRICKS",
1058
+ id: "0100-EUR",
1059
+ identification: {
1060
+ number: "115-1484940297",
1061
+ bankCode: "0100",
1062
+ iban: "CZ4201000001151484940297",
1063
+ holderName: "Devizov\xE1 Burza a.s."
1064
+ },
1065
+ fallbackLastSync: monthAgo,
1066
+ currency: "EUR",
1067
+ production: true
1068
+ },
1069
+ {
1070
+ connectorKey: "FINBRICKS",
1071
+ id: "0100-USD",
1072
+ identification: {
1073
+ number: "115-1483960237",
1074
+ bankCode: "0100",
1075
+ iban: "CZ6201000001151483960237",
1076
+ holderName: "Devizov\xE1 Burza a.s."
1077
+ },
1078
+ fallbackLastSync: monthAgo,
1079
+ currency: "USD",
1080
+ production: true
1081
+ },
1082
+ {
1083
+ connectorKey: "FINBRICKS",
1084
+ id: "0100-PLN",
1085
+ identification: {
1086
+ number: "115-6674290267",
1087
+ bankCode: "0100",
1088
+ iban: "CZ3501000001156674290267",
1089
+ holderName: "Devizov\xE1 Burza a.s."
1090
+ },
1091
+ fallbackLastSync: monthAgo,
1092
+ currency: "PLN",
1093
+ production: true
1094
+ },
1095
+ {
1096
+ connectorKey: "FINBRICKS",
1097
+ id: "0100-SEK",
1098
+ identification: {
1099
+ number: "115-9578110207",
1100
+ bankCode: "0100",
1101
+ iban: "CZ2401000001159578110207",
1102
+ holderName: "Devizov\xE1 Burza a.s."
1103
+ },
1104
+ fallbackLastSync: monthAgo,
1105
+ currency: "SEK",
1106
+ production: true
1107
+ },
1108
+ // Česká spořitelna (0800)
1109
+ {
1110
+ connectorKey: "ERSTE",
1111
+ id: "0800-CZK",
1112
+ identification: {
1113
+ number: "4413926379",
1114
+ bankCode: "0800",
1115
+ iban: "CZ7908000000004413926379",
1116
+ holderName: "Devizov\xE1 Burza a.s."
1117
+ },
1118
+ fallbackLastSync: monthAgo,
1119
+ currency: "CZK",
1120
+ production: true
1121
+ },
1122
+ {
1123
+ connectorKey: "ERSTE",
1124
+ id: "0800-EUR",
1125
+ identification: {
1126
+ number: "1966646293",
1127
+ bankCode: "0800",
1128
+ iban: "CZ2308000000001966646293",
1129
+ holderName: "Devizov\xE1 Burza a.s."
1130
+ },
1131
+ fallbackLastSync: monthAgo,
1132
+ currency: "EUR",
1133
+ production: true
1134
+ },
1135
+ {
1136
+ connectorKey: "ERSTE",
1137
+ id: "0800-USD",
1138
+ identification: {
1139
+ number: "1978982243",
1140
+ bankCode: "0800",
1141
+ iban: "CZ1908000000001978982243",
1142
+ holderName: "Devizov\xE1 Burza a.s."
1143
+ },
1144
+ fallbackLastSync: monthAgo,
1145
+ currency: "USD",
1146
+ production: true
1147
+ },
1148
+ {
1149
+ connectorKey: "ERSTE",
1150
+ id: "0800-HUF",
1151
+ identification: {
1152
+ number: "13461252",
1153
+ bankCode: "0800",
1154
+ iban: "CZ1908000000000013461252",
1155
+ holderName: "Devizov\xE1 Burza a.s."
1156
+ },
1157
+ fallbackLastSync: monthAgo,
1158
+ currency: "HUF",
1159
+ production: true
1160
+ },
1161
+ // MONETA Money Bank (0600)
1162
+ {
1163
+ connectorKey: "FINBRICKS",
1164
+ id: "0600-CZK",
1165
+ identification: {
1166
+ number: "224252186",
1167
+ bankCode: "0600",
1168
+ iban: "CZ5906000000000224252186",
1169
+ holderName: "Devizov\xE1 Burza a.s."
1170
+ },
1171
+ fallbackLastSync: monthAgo,
1172
+ currency: "CZK",
1173
+ production: true
1174
+ },
1175
+ {
1176
+ connectorKey: "FINBRICKS",
1177
+ id: "0600-EUR",
1178
+ identification: {
1179
+ number: "224252231",
1180
+ bankCode: "0600",
1181
+ iban: "CZ0806000000000224252231",
1182
+ holderName: "Devizov\xE1 Burza a.s."
1183
+ },
1184
+ fallbackLastSync: monthAgo,
1185
+ currency: "EUR",
1186
+ production: true
1187
+ },
1188
+ {
1189
+ connectorKey: "FINBRICKS",
1190
+ id: "0600-USD",
1191
+ identification: {
1192
+ number: "224252290",
1193
+ bankCode: "0600",
1194
+ iban: "CZ6406000000000224252290",
1195
+ holderName: "Devizov\xE1 Burza a.s."
1196
+ },
1197
+ fallbackLastSync: monthAgo,
1198
+ currency: "USD",
1199
+ production: true
1200
+ },
1201
+ // NEY spořitelní družstvo (2260)
1202
+ {
1203
+ connectorKey: "FINBRICKS",
1204
+ id: "2260-CZK",
1205
+ identification: {
1206
+ number: "1702700014",
1207
+ bankCode: "2260",
1208
+ iban: "CZ7422600000001702700014",
1209
+ holderName: "Devizov\xE1 Burza a.s."
1210
+ },
1211
+ fallbackLastSync: monthAgo,
1212
+ currency: "CZK",
1213
+ production: true
1214
+ }
1215
+ ]
1216
+ }
1217
+ );
1217
1218
  }
1218
1219
  };
1219
1220
  }
1221
+ const monthAgo = new Date(
1222
+ Date.now() - 30 * 24 * 60 * 60 * 1e3
1223
+ // 30 days ago
1224
+ );
1220
1225
 
1221
1226
  const BankService = defineBankService();
1222
1227