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