@actual-app/sync-server 25.4.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/.dockerignore +12 -0
  2. package/README.md +19 -0
  3. package/app.js +11 -0
  4. package/babel.config.json +3 -0
  5. package/bin/@actual-app/sync-server +55 -0
  6. package/docker/alpine.Dockerfile +62 -0
  7. package/docker/ubuntu.Dockerfile +63 -0
  8. package/docker-compose.yml +29 -0
  9. package/jest.config.json +19 -0
  10. package/jest.global-setup.js +101 -0
  11. package/jest.global-teardown.js +6 -0
  12. package/migrations/1694360000000-create-folders.js +25 -0
  13. package/migrations/1694360479680-create-account-db.js +30 -0
  14. package/migrations/1694362247011-create-secret-table.js +16 -0
  15. package/migrations/1702667624000-rename-nordigen-secrets.js +19 -0
  16. package/migrations/1718889148000-openid.js +41 -0
  17. package/migrations/1719409568000-multiuser.js +116 -0
  18. package/package.json +64 -0
  19. package/src/account-db.js +239 -0
  20. package/src/accounts/openid.js +361 -0
  21. package/src/accounts/password.js +149 -0
  22. package/src/app-account.js +155 -0
  23. package/src/app-admin.js +410 -0
  24. package/src/app-admin.test.js +381 -0
  25. package/src/app-gocardless/README.md +198 -0
  26. package/src/app-gocardless/app-gocardless.js +274 -0
  27. package/src/app-gocardless/bank-factory.js +91 -0
  28. package/src/app-gocardless/banks/abanca_caglesmm.js +22 -0
  29. package/src/app-gocardless/banks/abnamro_abnanl2a.js +57 -0
  30. package/src/app-gocardless/banks/american_express_aesudef1.js +40 -0
  31. package/src/app-gocardless/banks/bancsabadell_bsabesbbb.js +31 -0
  32. package/src/app-gocardless/banks/bank.interface.ts +51 -0
  33. package/src/app-gocardless/banks/bank_of_ireland_b365_bofiie2d.js +39 -0
  34. package/src/app-gocardless/banks/bankinter_bkbkesmm.js +24 -0
  35. package/src/app-gocardless/banks/belfius_gkccbebb.js +17 -0
  36. package/src/app-gocardless/banks/berliner_sparkasse_beladebexxx.js +61 -0
  37. package/src/app-gocardless/banks/bnp_be_gebabebb.js +73 -0
  38. package/src/app-gocardless/banks/cbc_cregbebb.js +34 -0
  39. package/src/app-gocardless/banks/commerzbank_cobadeff.js +51 -0
  40. package/src/app-gocardless/banks/danskebank_dabno22.js +39 -0
  41. package/src/app-gocardless/banks/direkt_heladef1822.js +18 -0
  42. package/src/app-gocardless/banks/easybank_bawaatww.js +50 -0
  43. package/src/app-gocardless/banks/entercard_swednokk.js +40 -0
  44. package/src/app-gocardless/banks/fortuneo_ftnofrp1xxx.js +46 -0
  45. package/src/app-gocardless/banks/hype_hyeeit22.js +74 -0
  46. package/src/app-gocardless/banks/ing_ingbrobu.js +70 -0
  47. package/src/app-gocardless/banks/ing_ingddeff.js +47 -0
  48. package/src/app-gocardless/banks/ing_pl_ingbplpw.js +46 -0
  49. package/src/app-gocardless/banks/integration-bank.js +115 -0
  50. package/src/app-gocardless/banks/isybank_itbbitmm.js +18 -0
  51. package/src/app-gocardless/banks/kbc_kredbebb.js +33 -0
  52. package/src/app-gocardless/banks/lhv-lhvbee22.js +36 -0
  53. package/src/app-gocardless/banks/mbank_retail_brexplpw.js +56 -0
  54. package/src/app-gocardless/banks/nationwide_naiagb21.js +46 -0
  55. package/src/app-gocardless/banks/nbg_ethngraaxxx.js +51 -0
  56. package/src/app-gocardless/banks/norwegian_xx_norwnok1.js +74 -0
  57. package/src/app-gocardless/banks/revolut_revolt21.js +37 -0
  58. package/src/app-gocardless/banks/sandboxfinance_sfin0000.js +28 -0
  59. package/src/app-gocardless/banks/seb_kort_bank_ab.js +58 -0
  60. package/src/app-gocardless/banks/seb_privat.js +29 -0
  61. package/src/app-gocardless/banks/sparnord_spnodk22.js +24 -0
  62. package/src/app-gocardless/banks/spk_karlsruhe_karsde66.js +61 -0
  63. package/src/app-gocardless/banks/spk_marburg_biedenkopf_heladef1mar.js +30 -0
  64. package/src/app-gocardless/banks/spk_worms_alzey_ried_malade51wor.js +19 -0
  65. package/src/app-gocardless/banks/ssk_dusseldorf_dussdeddxxx.js +50 -0
  66. package/src/app-gocardless/banks/swedbank_habalv22.js +47 -0
  67. package/src/app-gocardless/banks/tests/abanca_caglesmm.spec.js +21 -0
  68. package/src/app-gocardless/banks/tests/abnamro_abnanl2a.spec.js +61 -0
  69. package/src/app-gocardless/banks/tests/bancsabadell_bsabesbbb.spec.js +53 -0
  70. package/src/app-gocardless/banks/tests/belfius_gkccbebb.spec.js +22 -0
  71. package/src/app-gocardless/banks/tests/cbc_cregbebb.spec.js +34 -0
  72. package/src/app-gocardless/banks/tests/commerzbank_cobadeff.spec.js +110 -0
  73. package/src/app-gocardless/banks/tests/easybank_bawaatww.spec.js +54 -0
  74. package/src/app-gocardless/banks/tests/fortuneo_ftnofrp1xxx.spec.js +206 -0
  75. package/src/app-gocardless/banks/tests/ing_ingddeff.spec.js +302 -0
  76. package/src/app-gocardless/banks/tests/ing_pl_ingbplpw.spec.js +202 -0
  77. package/src/app-gocardless/banks/tests/integration_bank.spec.js +158 -0
  78. package/src/app-gocardless/banks/tests/kbc_kredbebb.spec.js +38 -0
  79. package/src/app-gocardless/banks/tests/lhv-lhvbee22.spec.js +68 -0
  80. package/src/app-gocardless/banks/tests/mbank_retail_brexplpw.spec.js +171 -0
  81. package/src/app-gocardless/banks/tests/nationwide_naiagb21.spec.js +105 -0
  82. package/src/app-gocardless/banks/tests/nbg_ethngraaxxx.spec.js +48 -0
  83. package/src/app-gocardless/banks/tests/revolut_revolt21.spec.js +42 -0
  84. package/src/app-gocardless/banks/tests/sandboxfinance_sfin0000.spec.js +133 -0
  85. package/src/app-gocardless/banks/tests/spk_marburg_biedenkopf_heladef1mar.spec.js +256 -0
  86. package/src/app-gocardless/banks/tests/ssk_dusseldorf_dussdeddxxx.spec.js +102 -0
  87. package/src/app-gocardless/banks/tests/swedbank_habalv22.spec.js +57 -0
  88. package/src/app-gocardless/banks/tests/virgin_nrnbgb22.spec.js +54 -0
  89. package/src/app-gocardless/banks/util/extract-payeeName-from-remittanceInfo.js +36 -0
  90. package/src/app-gocardless/banks/virgin_nrnbgb22.js +39 -0
  91. package/src/app-gocardless/errors.js +84 -0
  92. package/src/app-gocardless/gocardless-node.types.ts +497 -0
  93. package/src/app-gocardless/gocardless.types.ts +93 -0
  94. package/src/app-gocardless/link.html +18 -0
  95. package/src/app-gocardless/services/gocardless-service.js +620 -0
  96. package/src/app-gocardless/services/tests/fixtures.js +181 -0
  97. package/src/app-gocardless/services/tests/gocardless-service.spec.js +537 -0
  98. package/src/app-gocardless/tests/bank-factory.spec.js +20 -0
  99. package/src/app-gocardless/tests/utils.spec.js +162 -0
  100. package/src/app-gocardless/util/handle-error.js +16 -0
  101. package/src/app-gocardless/utils.js +45 -0
  102. package/src/app-openid.js +108 -0
  103. package/src/app-pluggyai/app-pluggyai.js +215 -0
  104. package/src/app-pluggyai/pluggyai-service.js +120 -0
  105. package/src/app-secrets.js +61 -0
  106. package/src/app-simplefin/app-simplefin.js +418 -0
  107. package/src/app-sync/errors.js +13 -0
  108. package/src/app-sync/services/files-service.js +243 -0
  109. package/src/app-sync/tests/services/files-service.test.js +250 -0
  110. package/src/app-sync/validation.js +77 -0
  111. package/src/app-sync.js +391 -0
  112. package/src/app-sync.test.js +877 -0
  113. package/src/app.js +145 -0
  114. package/src/config-types.ts +44 -0
  115. package/src/db.js +58 -0
  116. package/src/load-config.js +307 -0
  117. package/src/migrations.js +36 -0
  118. package/src/run-migrations.js +8 -0
  119. package/src/scripts/disable-openid.js +44 -0
  120. package/src/scripts/enable-openid.js +53 -0
  121. package/src/scripts/health-check.js +23 -0
  122. package/src/scripts/reset-password.js +51 -0
  123. package/src/secrets.test.js +83 -0
  124. package/src/services/secrets-service.js +94 -0
  125. package/src/services/user-service.js +272 -0
  126. package/src/sql/messages.sql +9 -0
  127. package/src/sync-simple.js +95 -0
  128. package/src/util/hash.js +5 -0
  129. package/src/util/middlewares.js +62 -0
  130. package/src/util/paths.js +13 -0
  131. package/src/util/payee-name.js +45 -0
  132. package/src/util/prompt.js +88 -0
  133. package/src/util/title/index.js +59 -0
  134. package/src/util/title/lower-case.js +93 -0
  135. package/src/util/title/specials.js +21 -0
  136. package/src/util/validate-user.js +68 -0
  137. package/tsconfig.json +21 -0
@@ -0,0 +1,497 @@
1
+ type RequisitionStatus =
2
+ | 'CR'
3
+ | 'ID'
4
+ | 'LN'
5
+ | 'RJ'
6
+ | 'ER'
7
+ | 'SU'
8
+ | 'EX'
9
+ | 'GC'
10
+ | 'UA'
11
+ | 'GA'
12
+ | 'SA';
13
+
14
+ export type Requisition = {
15
+ /**
16
+ * option to enable account selection view for the end user
17
+ */
18
+ account_selection: boolean;
19
+
20
+ /**
21
+ * array of account IDs retrieved within a scope of this requisition
22
+ */
23
+ accounts: string[];
24
+
25
+ /**
26
+ * EUA associated with this requisition
27
+ */
28
+ agreement: string;
29
+
30
+ /**
31
+ * The date & time at which the requisition was created.
32
+ */
33
+ created: string;
34
+
35
+ /**
36
+ * The unique ID of the requisition
37
+ */
38
+ id: string;
39
+
40
+ /**
41
+ * an Institution ID for this Requisition
42
+ */
43
+ institution_id: string;
44
+
45
+ /**
46
+ * link to initiate authorization with Institution
47
+ */
48
+ link: string;
49
+
50
+ /**
51
+ * redirect URL to your application after end-user authorization with ASPSP
52
+ */
53
+ redirect: string;
54
+
55
+ /**
56
+ * enable redirect back to the client after account list received
57
+ */
58
+ redirect_immediate: boolean;
59
+
60
+ /**
61
+ * additional ID to identify the end user
62
+ */
63
+ reference: string;
64
+
65
+ /**
66
+ * optional SSN field to verify ownership of the account
67
+ */
68
+ ssn: string;
69
+
70
+ /**
71
+ * status of this requisition
72
+ */
73
+ status: RequisitionStatus;
74
+
75
+ /**
76
+ * A two-letter country code (ISO 639-1)
77
+ */
78
+ user_language: string;
79
+ };
80
+
81
+ /**
82
+ * Object representing GoCardless account details
83
+ * Account details will be returned in Berlin Group PSD2 format.
84
+ */
85
+ export type GoCardlessAccountDetails = {
86
+ /**
87
+ * Resource id of the account
88
+ */
89
+ resourceId?: string;
90
+
91
+ /**
92
+ * BBAN of the account. This data element is used for payment accounts which have no IBAN
93
+ */
94
+ bban?: string;
95
+
96
+ /**
97
+ * BIC associated to the account
98
+ */
99
+ bic?: string;
100
+
101
+ /**
102
+ * External Cash Account Type 1 Code from ISO 20022
103
+ */
104
+ cashAccountType?: string;
105
+
106
+ /**
107
+ * Currency of the account
108
+ */
109
+ currency: string;
110
+
111
+ /**
112
+ * Specifications that might be provided by the financial institution, including
113
+ * - Characteristics of the account
114
+ * - Characteristics of the relevant card
115
+ */
116
+ details?: string;
117
+
118
+ /**
119
+ * Name of the account as defined by the end user within online channels
120
+ */
121
+ displayName?: string;
122
+
123
+ /**
124
+ * IBAN of the account
125
+ */
126
+ iban?: string;
127
+
128
+ /**
129
+ * This data attribute is a field where a financial institution can name a cash account associated with pending card transactions
130
+ */
131
+ linkedAccounts?: string;
132
+
133
+ /**
134
+ * Alias to a payment account via a registered mobile phone number
135
+ */
136
+ msisdn?: string;
137
+
138
+ /**
139
+ * Name of the account, as assigned by the financial institution
140
+ */
141
+ name?: string;
142
+
143
+ /**
144
+ * Address of the legal account owner
145
+ */
146
+ ownerAddressUnstructured?: string[];
147
+
148
+ /**
149
+ * Name of the legal account owner. If there is more than one owner, then two names might be noted here. For a corporate account, the corporate name is used for this attribute.
150
+ */
151
+ ownerName?: string;
152
+
153
+ /**
154
+ * Product Name of the Bank for this account, proprietary definition
155
+ */
156
+ product?: string;
157
+
158
+ /**
159
+ * Account status. The value is one of the following:
160
+ * - "enabled": account is available
161
+ * - "deleted": account is terminated
162
+ * - "blocked": account is blocked, e.g. for legal reasons
163
+ *
164
+ * If this field is not used, then the account is considered available according to the specification.
165
+ */
166
+ status?: 'enabled' | 'deleted' | 'blocked';
167
+
168
+ /**
169
+ * Specifies the usage of the account:
170
+ * - PRIV: private personal account
171
+ * - ORGA: professional account
172
+ */
173
+ usage?: 'PRIV' | 'ORGA';
174
+ };
175
+
176
+ /**
177
+ * Representation of the GoCardless account metadata
178
+ */
179
+ export type GoCardlessAccountMetadata = {
180
+ /**
181
+ * ID of the GoCardless account metadata
182
+ */
183
+ id: string;
184
+ /**
185
+ * Date when the GoCardless account metadata was created
186
+ */
187
+ created: string;
188
+ /**
189
+ * Date of the last access to the GoCardless account metadata
190
+ */
191
+ last_accessed: string;
192
+ /**
193
+ * IBAN of the GoCardless account metadata
194
+ */
195
+ iban: string;
196
+ /**
197
+ * ID of the institution associated with the GoCardless account metadata
198
+ */
199
+ institution_id: string;
200
+ /**
201
+ * Status of the GoCardless account
202
+ * DISCOVERED: User has successfully authenticated and account is discovered
203
+ * PROCESSING: Account is being processed by the Institution
204
+ * ERROR: An error was encountered when processing account
205
+ * EXPIRED: Access to account has expired as set in End User Agreement
206
+ * READY: Account has been successfully processed
207
+ * SUSPENDED: Account has been suspended (more than 10 consecutive failed attempts to access the account)
208
+ */
209
+ status:
210
+ | 'DISCOVERED'
211
+ | 'PROCESSING'
212
+ | 'ERROR'
213
+ | 'EXPIRED'
214
+ | 'READY'
215
+ | 'SUSPENDED';
216
+ /**
217
+ * Name of the owner of the GoCardless account metadata
218
+ */
219
+ owner_name: string;
220
+ };
221
+
222
+ /**
223
+ * Information about the Institution
224
+ */
225
+ export type Institution = {
226
+ /**
227
+ * The id of the institution, for example "N26_NTSBDEB1"
228
+ */
229
+ id: string;
230
+
231
+ /**
232
+ * The name of the institution, for example "N26 Bank"
233
+ */
234
+ name: string;
235
+
236
+ /**
237
+ * The BIC of the institution, for example "NTSBDEB1"
238
+ */
239
+ bic: string;
240
+
241
+ /**
242
+ * The total number of days of transactions available, for example "90"
243
+ */
244
+ transaction_total_days: string;
245
+
246
+ /**
247
+ * The countries where the institution operates, for example `["PL"]`
248
+ */
249
+ countries: string[];
250
+
251
+ /**
252
+ * The logo URL of the institution, for example "https://cdn.nordigen.com/ais/N26_SANDBOX_NTSBDEB1.png"
253
+ */
254
+ logo: string;
255
+
256
+ /**
257
+ * The total number of days that a requisition stays valid before requiring
258
+ * renewal
259
+ */
260
+ max_access_valid_for_days: string;
261
+
262
+ supported_payments?: object;
263
+ supported_features?: string[];
264
+ };
265
+
266
+ /**
267
+ * An object containing information about a balance
268
+ */
269
+ export type Balance = {
270
+ /**
271
+ * An object containing the balance amount and currency
272
+ */
273
+ balanceAmount: Amount;
274
+ /**
275
+ * The type of balance
276
+ */
277
+ balanceType:
278
+ | 'closingBooked'
279
+ | 'expected'
280
+ | 'forwardAvailable'
281
+ | 'interimAvailable'
282
+ | 'interimBooked'
283
+ | 'nonInvoiced'
284
+ | 'openingBooked';
285
+ /**
286
+ * A flag indicating if the credit limit of the corresponding account is included in the calculation of the balance (if applicable)
287
+ */
288
+ creditLimitIncluded?: boolean;
289
+ /**
290
+ * The date and time of the last change to the balance
291
+ */
292
+ lastChangeDateTime?: string;
293
+ /**
294
+ * The reference of the last committed transaction to support the TPP in identifying whether all end users transactions are already known
295
+ */
296
+ lastCommittedTransaction?: string;
297
+ /**
298
+ * The date of the balance
299
+ */
300
+ referenceDate?: string;
301
+ };
302
+
303
+ /**
304
+ * An object representing the amount of a transaction
305
+ */
306
+ export type Amount = {
307
+ /**
308
+ * The amount of the transaction
309
+ */
310
+ amount: string;
311
+
312
+ /**
313
+ * The currency of the transaction
314
+ */
315
+ currency: string;
316
+ };
317
+
318
+ /**
319
+ * An object representing a financial transaction
320
+ */
321
+ export type Transaction = {
322
+ /**
323
+ * Might be used by the financial institution to transport additional transaction-related information.
324
+ */
325
+ additionalInformation?: string;
326
+
327
+ /**
328
+ * Is used if and only if the bookingStatus entry equals "information".
329
+ */
330
+ bookingStatus?: string;
331
+
332
+ /**
333
+ * The balance after this transaction. Recommended balance type is interimBooked.
334
+ */
335
+ balanceAfterTransaction?: Pick<Balance, 'balanceType' | 'balanceAmount'>;
336
+
337
+ /**
338
+ * Bank transaction code as used by the financial institution and using the sub elements of this structured code defined by ISO20022. For standing order reports the following codes are applicable:
339
+ * "PMNT-ICDT-STDO" for credit transfers,
340
+ * "PMNT-IRCT-STDO" for instant credit transfers,
341
+ * "PMNT-ICDT-XBST" for cross-border credit transfers,
342
+ * "PMNT-IRCT-XBST" for cross-border real-time credit transfers,
343
+ * "PMNT-MCOP-OTHR" for specific standing orders which have a dynamic amount to move left funds e.g. on month end to a saving account
344
+ */
345
+ bankTransactionCode?: string;
346
+
347
+ /**
348
+ * The date when an entry is posted to an account on the financial institution's books.
349
+ */
350
+ bookingDate?: string;
351
+
352
+ /**
353
+ * The date and time when an entry is posted to an account on the financial institution's books.
354
+ */
355
+ bookingDateTime?: string;
356
+
357
+ /**
358
+ * Identification of a cheque
359
+ */
360
+ checkId?: string;
361
+
362
+ /**
363
+ * Account reference, conditional
364
+ */
365
+ creditorAccount?:
366
+ | string
367
+ | {
368
+ iban?: string;
369
+ };
370
+
371
+ /**
372
+ * BICFI
373
+ */
374
+ creditorAgent?: string;
375
+
376
+ /**
377
+ * Identification of creditors, e.g. a SEPA Creditor ID
378
+ */
379
+ creditorId?: string;
380
+
381
+ /**
382
+ * Name of the creditor if a "debited" transaction
383
+ */
384
+ creditorName?: string;
385
+
386
+ /**
387
+ * Array of report exchange rates
388
+ */
389
+ currencyExchange?: string[];
390
+
391
+ /**
392
+ * Account reference, conditional
393
+ */
394
+ debtorAccount?: {
395
+ iban: string;
396
+ };
397
+
398
+ /**
399
+ * BICFI
400
+ */
401
+ debtorAgent?: string;
402
+
403
+ /**
404
+ * Name of the debtor if a "credited" transaction
405
+ */
406
+ debtorName?: string;
407
+
408
+ /**
409
+ * Unique end-to-end ID
410
+ */
411
+ endToEndId?: string;
412
+
413
+ /**
414
+ * The identification of the transaction as used for reference given by the financial institution.
415
+ */
416
+ entryReference?: string;
417
+
418
+ /**
419
+ * Transaction identifier given by GoCardless
420
+ */
421
+ internalTransactionId?: string;
422
+
423
+ /**
424
+ * Identification of Mandates, e.g. a SEPA Mandate ID
425
+ */
426
+ mandateId?: string;
427
+
428
+ /**
429
+ * Merchant category code as defined by card issuer
430
+ */
431
+ merchantCategoryCode?: string;
432
+
433
+ /**
434
+ * Proprietary bank transaction code as used within a community or within an financial institution
435
+ */
436
+ proprietaryBankTransactionCode?: string;
437
+
438
+ /**
439
+ * Conditional
440
+ */
441
+ purposeCode?: string;
442
+
443
+ /**
444
+ * Reference as contained in the structured remittance reference structure
445
+ */
446
+ remittanceInformationStructured?: string;
447
+
448
+ /**
449
+ * Reference as contained in the structured remittance array reference structure
450
+ */
451
+ remittanceInformationStructuredArray?: string[];
452
+
453
+ /**
454
+ * Reference as contained in the unstructured remittance reference structure
455
+ */
456
+ remittanceInformationUnstructured?: string;
457
+
458
+ /**
459
+ * Reference as contained in the unstructured remittance array reference structure
460
+ */
461
+ remittanceInformationUnstructuredArray?: string[];
462
+
463
+ /**
464
+ * The amount of the transaction as billed to the account
465
+ */
466
+ transactionAmount: Amount;
467
+
468
+ /**
469
+ * Unique transaction identifier given by financial institution
470
+ */
471
+ transactionId?: string;
472
+
473
+ /**
474
+ *
475
+ */
476
+ ultimateCreditor?: string;
477
+
478
+ /**
479
+ *
480
+ */
481
+ ultimateDebtor?: string;
482
+
483
+ /**
484
+ * The Date at which assets become available to the account owner in case of a credit
485
+ */
486
+ valueDate?: string;
487
+
488
+ /**
489
+ * The date and time at which assets become available to the account owner in case of a credit
490
+ */
491
+ valueDateTime?: string;
492
+ };
493
+
494
+ export type Transactions = {
495
+ booked: Transaction[];
496
+ pending: Transaction[];
497
+ };
@@ -0,0 +1,93 @@
1
+ import {
2
+ GoCardlessAccountMetadata,
3
+ GoCardlessAccountDetails,
4
+ Institution,
5
+ Transactions,
6
+ Balance,
7
+ Transaction,
8
+ } from './gocardless-node.types.js';
9
+
10
+ export type DetailedAccount = Omit<GoCardlessAccountDetails, 'status'> &
11
+ GoCardlessAccountMetadata;
12
+ export type DetailedAccountWithInstitution = DetailedAccount & {
13
+ institution: Institution;
14
+ };
15
+ export type TransactionWithBookedStatus = Transaction & { booked: boolean };
16
+
17
+ export type NormalizedAccountDetails = {
18
+ /**
19
+ * Id of the account
20
+ */
21
+ account_id: string;
22
+
23
+ /**
24
+ * Institution of account
25
+ */
26
+ institution: Institution;
27
+
28
+ /**
29
+ * last 4 digits from the account iban
30
+ */
31
+ mask: string;
32
+
33
+ /**
34
+ * the account iban
35
+ */
36
+ iban: string;
37
+
38
+ /**
39
+ * Name displayed on the UI of Actual app
40
+ */
41
+ name: string;
42
+
43
+ /**
44
+ * name of the product in the institution
45
+ */
46
+ official_name: string;
47
+
48
+ /**
49
+ * type of account
50
+ */
51
+ type: string;
52
+ };
53
+
54
+ export type GetTransactionsParams = {
55
+ /**
56
+ * Id of the institution from GoCardless
57
+ */
58
+ institutionId: string;
59
+
60
+ /**
61
+ * Id of account from the GoCardless app
62
+ */
63
+ accountId: string;
64
+
65
+ /**
66
+ * Begin date of the period from which we want to download transactions
67
+ */
68
+ startDate: string;
69
+
70
+ /**
71
+ * End date of the period from which we want to download transactions
72
+ */
73
+ endDate?: string;
74
+ };
75
+
76
+ export type GetTransactionsResponse = {
77
+ status_code?: number;
78
+ detail?: string;
79
+ transactions: Transactions;
80
+ };
81
+
82
+ export type CreateRequisitionParams = {
83
+ institutionId: string;
84
+
85
+ /**
86
+ * Host of your frontend app - on this host you will be redirected after linking with bank
87
+ */
88
+ host: string;
89
+ };
90
+
91
+ export type GetBalances = {
92
+ balances: Balance[];
93
+ };
@@ -0,0 +1,18 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Actual</title>
6
+ </head>
7
+ <body>
8
+ <script>
9
+ window.close();
10
+ </script>
11
+
12
+ <p>Please wait...</p>
13
+ <p>
14
+ The window should close automatically. If nothing happened you can close
15
+ this window or tab.
16
+ </p>
17
+ </body>
18
+ </html>