fints-lib-cli 0.2.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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +220 -0
  3. package/package.json +62 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Frederick Gnodtke
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,220 @@
1
+ # fints-lib-cli
2
+
3
+ [![npm](https://img.shields.io/npm/v/fints-lib-cli.svg)](https://www.npmjs.com/package/fints-lib-cli)
4
+ [![CI](https://github.com/larsdecker/fints/actions/workflows/ci.yml/badge.svg)](https://github.com/larsdecker/fints/actions/workflows/ci.yml)
5
+
6
+
7
+ A command line interface for communicating with [FinTS servers](https://www.hbci-zka.de/).
8
+
9
+ > **Note:** This is a fork and continuation of [Prior99/fints](https://github.com/Prior99/fints). Published as `fints-lib-cli` on npm.
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install -g fints-lib-cli
15
+ # or
16
+ yarn global add fints-lib-cli
17
+ ```
18
+
19
+
20
+ ## Features
21
+
22
+ - Load list of accounts.
23
+ - Load list of transactions in specified range.
24
+ - Fetch the current balance for an account.
25
+ - List holdings for depot accounts.
26
+ - Submit SEPA credit transfers.
27
+ - Submit SEPA direct debits.
28
+
29
+ ### List accounts
30
+
31
+ ```
32
+ List the accounts available for the specified user.
33
+
34
+ USAGE
35
+
36
+ fints-lib list-accounts --url <url> --name <name> --pin <pin> --blz <blz> [...options]
37
+
38
+ OPTIONS
39
+
40
+ -u, --url <url> - Endpoint URL.
41
+ -n, --name <name> - Username used for connecting.
42
+ -p, --pin <pin> - Pin used for connecting.
43
+ -b, --blz <blz> - BLZ of the bank to connect to.
44
+ -d, --debug
45
+ -v, --verbose
46
+ -j, --json
47
+ ```
48
+
49
+ ```
50
+ fints-lib list-accounts --url https://example.com/fints -n username -p 12345 -b 12345678
51
+ ```
52
+
53
+ ### Fetching transactions
54
+
55
+ ```
56
+ Fetch the statements for a specified account.
57
+
58
+ USAGE
59
+
60
+ fints-lib fetch-transactions --url <url> --name <name> --pin <pin> --blz <blz> --iban <iban> [...options]
61
+
62
+ OPTIONS
63
+
64
+ -u, --url <url> - Endpoint URL.
65
+ -n, --name <name> - Username used for connecting.
66
+ -p, --pin <pin> - Pin used for connecting.
67
+ -b, --blz <blz> - BLZ of the bank to connect to.
68
+ -d, --debug
69
+ -v, --verbose
70
+ -j, --json
71
+ -i, --iban <iban> - IBAN of the account to fetch.
72
+ -s, --start <start> - Date of earliest transaction to fetch.
73
+ -e, --end <end> - Date of latest transaction to fetch.
74
+ ```
75
+
76
+ ```
77
+ fints-lib fetch-transactions --url http://example.com/fints -n username -p 12345 -b 12345678 -i DE111234567800000001 -s 2018-01-01 -e 2018-10-01
78
+ ```
79
+
80
+ ### Fetch current balance
81
+
82
+ ```
83
+ Fetch the current balance for a specified account.
84
+
85
+ USAGE
86
+
87
+ fints-lib get-balance --url <url> --name <name> --pin <pin> --blz <blz> --iban <iban> [...options]
88
+
89
+ OPTIONS
90
+
91
+ -u, --url <url> - Endpoint URL.
92
+ -n, --name <name> - Username used for connecting.
93
+ -p, --pin <pin> - Pin used for connecting.
94
+ -b, --blz <blz> - BLZ of the bank to connect to.
95
+ -d, --debug
96
+ -v, --verbose
97
+ -j, --json
98
+ -i, --iban <iban> - IBAN of the account to fetch.
99
+ ```
100
+
101
+ ```
102
+ fints-lib get-balance --url https://example.com/fints -n username -p 12345 -b 12345678 -i DE111234567800000001
103
+ ```
104
+
105
+ ### List holdings
106
+
107
+ ```
108
+ List the holdings of a depot account.
109
+
110
+ USAGE
111
+
112
+ fints-lib list-holdings --url <url> --name <name> --pin <pin> --blz <blz> --iban <iban> [...options]
113
+
114
+ OPTIONS
115
+
116
+ -u, --url <url> - Endpoint URL.
117
+ -n, --name <name> - Username used for connecting.
118
+ -p, --pin <pin> - Pin used for connecting.
119
+ -b, --blz <blz> - BLZ of the bank to connect to.
120
+ -d, --debug
121
+ -v, --verbose
122
+ -j, --json
123
+ -i, --iban <iban> - IBAN of the depot account to fetch.
124
+ ```
125
+
126
+ ```
127
+ fints-lib list-holdings --url https://example.com/fints -n username -p 12345 -b 12345678 -i DE111234567800000001
128
+ ```
129
+
130
+ ### Submit credit transfer
131
+
132
+ ```
133
+ Submit a SEPA credit transfer request.
134
+
135
+ USAGE
136
+
137
+ fints-lib submit-credit-transfer --url <url> --name <name> --pin <pin> --blz <blz> --account-iban <iban> --creditor-name <name> \
138
+ --creditor-iban <iban> --amount <amount> [...options]
139
+
140
+ OPTIONS
141
+
142
+ -u, --url <url> - Endpoint URL.
143
+ -n, --name <name> - Username used for connecting.
144
+ -p, --pin <pin> - Pin used for connecting.
145
+ -b, --blz <blz> - BLZ of the bank to connect to.
146
+ --account-iban <iban> - IBAN of the debtor account.
147
+ --debtor-name <name> - Name of the debtor.
148
+ --creditor-name <name> - Name of the creditor.
149
+ --creditor-iban <iban> - IBAN of the creditor.
150
+ --creditor-bic <bic> - BIC of the creditor (optional).
151
+ --amount <amount> - Amount to transfer.
152
+ --execution-date <date> - Requested execution date (YYYY-MM-DD).
153
+ --end-to-end-id <id> - End-to-end reference.
154
+ --remittance <text> - Unstructured remittance information.
155
+ --purpose-code <code> - Purpose code for the transfer.
156
+ --message-id <id> - Optional message identifier.
157
+ --payment-information-id <id>- Optional payment information identifier.
158
+ --batch - Request batch booking.
159
+ --tan <tan> - Provide TAN to skip the interactive prompt.
160
+ -d, --debug
161
+ -v, --verbose
162
+ -j, --json
163
+ ```
164
+
165
+ ```
166
+ fints-lib submit-credit-transfer --url https://example.com/fints --name username --pin 12345 --blz 12345678 \
167
+ --account-iban DE02120300000000202051 --debtor-name "John Doe" --creditor-name "ACME GmbH" \
168
+ --creditor-iban DE44500105175407324931 --amount 100.00 --remittance "Invoice 0815"
169
+ ```
170
+
171
+ ### Submit direct debit
172
+
173
+ ```
174
+ Submit a SEPA direct debit request.
175
+
176
+ USAGE
177
+
178
+ fints-lib submit-direct-debit --url <url> --name <name> --pin <pin> --blz <blz> --account-iban <iban> --creditor-name <name> \
179
+ --creditor-id <id> --debtor-name <name> --debtor-iban <iban> --amount <amount> --mandate-id <id> --mandate-date <date> \
180
+ --collection-date <date> [...options]
181
+
182
+ OPTIONS
183
+
184
+ -u, --url <url> - Endpoint URL.
185
+ -n, --name <name> - Username used for connecting.
186
+ -p, --pin <pin> - Pin used for connecting.
187
+ -b, --blz <blz> - BLZ of the bank to connect to.
188
+ --account-iban <iban> - IBAN of the creditor account.
189
+ --creditor-name <name> - Name of the creditor.
190
+ --creditor-id <id> - SEPA creditor identifier.
191
+ --debtor-name <name> - Name of the debtor.
192
+ --debtor-iban <iban> - IBAN of the debtor.
193
+ --amount <amount> - Amount to collect.
194
+ --mandate-id <id> - SEPA mandate identifier.
195
+ --mandate-date <date> - Mandate signature date (YYYY-MM-DD).
196
+ --collection-date <date> - Requested collection date (YYYY-MM-DD).
197
+ --sequence-type <type> - Sequence type (OOFF, FRST, RCUR, FNAL).
198
+ --local-instrument <code> - Local instrument (CORE or B2B).
199
+ --end-to-end-id <id> - End-to-end reference.
200
+ --remittance <text> - Unstructured remittance information.
201
+ --purpose-code <code> - Purpose code for the debit.
202
+ --message-id <id> - Optional message identifier.
203
+ --payment-information-id <id>- Optional payment information identifier.
204
+ --batch - Request batch booking.
205
+ --tan <tan> - Provide TAN to skip the interactive prompt.
206
+ -d, --debug
207
+ -v, --verbose
208
+ -j, --json
209
+ ```
210
+
211
+ ```
212
+ fints-lib submit-direct-debit --url https://example.com/fints --name username --pin 12345 --blz 12345678 \
213
+ --account-iban DE111234567800000001 --creditor-name "ACME GmbH" --creditor-id DE98ZZZ09999999999 \
214
+ --debtor-name "John Doe" --debtor-iban DE02120300000000202051 --amount 42.50 --mandate-id MANDATE-123 \
215
+ --mandate-date 2022-01-10 --collection-date 2022-01-15 --remittance "Invoice 0815"
216
+ ```
217
+
218
+ ## Resources
219
+
220
+ - [Database of banks with their URLs](https://github.com/jhermsmeier/fints-institute-db)
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "fints-lib-cli",
3
+ "version": "0.2.0",
4
+ "description": "FinTS command line interface.",
5
+ "keywords": [
6
+ "fints",
7
+ "hbci",
8
+ "banking",
9
+ "api",
10
+ "cli",
11
+ "command-line",
12
+ "psd2",
13
+ "sepa",
14
+ "german-banking",
15
+ "online-banking"
16
+ ],
17
+ "bin": {
18
+ "fints-lib": "dist/index.js"
19
+ },
20
+ "main": "dist/index.js",
21
+ "scripts": {
22
+ "build": "tsc",
23
+ "clean": "rm -rf dist",
24
+ "test": "jest"
25
+ },
26
+ "files": [
27
+ "dist",
28
+ "LICENSE",
29
+ "package.json",
30
+ "README.md"
31
+ ],
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/larsdecker/fints",
35
+ "directory": "packages/fints-cli"
36
+ },
37
+ "author": "Frederick Gnodtke",
38
+ "contributors": [
39
+ {
40
+ "name": "Lars Decker",
41
+ "url": "https://github.com/larsdecker"
42
+ }
43
+ ],
44
+ "license": "MIT",
45
+ "dependencies": {
46
+ "clime": "^0.5.16",
47
+ "date-fns": "^4.1.0",
48
+ "fints-lib": "^0.5.0",
49
+ "winston": "^3.19.0",
50
+ "yamljs": "^0.3.0"
51
+ },
52
+ "devDependencies": {
53
+ "@types/jest": "^29.5.14",
54
+ "@types/node": "^25.0.3",
55
+ "@types/winston": "^2.4.4",
56
+ "@types/yamljs": "^0.2.34",
57
+ "jest": "^29.7.0",
58
+ "minimatch": "^10.0.1",
59
+ "ts-jest": "^29.4.6",
60
+ "typescript": "^5.8.0"
61
+ }
62
+ }