prior99 / fints Goto Github PK
View Code? Open in Web Editor NEWTypescript FinTS client library.
License: MIT License
Typescript FinTS client library.
License: MIT License
When trying to build this project
$ npm run build
, it fails because the node types are missing.
> [email protected] build /Users/sta/repo/fints/packages/fints-cli
> tsc
node_modules/clime/bld/castable/fs.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.
1 /// <reference types="node" />
~~~~
node_modules/clime/bld/castable/fs.d.ts:11:23 - error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.
11 buffer(): Promise<Buffer>;
~~~~~~
node_modules/clime/bld/core/cli.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.
1 /// <reference types="node" />
~~~~
node_modules/clime/bld/core/cli.d.ts:97:19 - error TS2503: Cannot find namespace 'NodeJS'.
97 print(stdout: NodeJS.WritableStream, stderr: NodeJS.WritableStream): Promise<void>;
~~~~~~
node_modules/clime/bld/core/cli.d.ts:97:50 - error TS2503: Cannot find namespace 'NodeJS'.
97 print(stdout: NodeJS.WritableStream, stderr: NodeJS.WritableStream): Promise<void>;
~~~~~~
node_modules/clime/bld/core/command/help.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.
1 /// <reference types="node" />
~~~~
node_modules/clime/bld/core/command/help.d.ts:25:20 - error TS2503: Cannot find namespace 'NodeJS'.
25 print(_stdout: NodeJS.WritableStream, stderr: NodeJS.WritableStream): void;
~~~~~~
node_modules/clime/bld/core/command/help.d.ts:25:51 - error TS2503: Cannot find namespace 'NodeJS'.
25 print(_stdout: NodeJS.WritableStream, stderr: NodeJS.WritableStream): void;
~~~~~~
node_modules/clime/bld/core/error.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.
1 /// <reference types="node" />
~~~~
node_modules/clime/bld/core/error.d.ts:7:20 - error TS2503: Cannot find namespace 'NodeJS'.
7 print(_stdout: NodeJS.WritableStream, stderr: NodeJS.WritableStream): void;
~~~~~~
node_modules/clime/bld/core/error.d.ts:7:51 - error TS2503: Cannot find namespace 'NodeJS'.
7 print(_stdout: NodeJS.WritableStream, stderr: NodeJS.WritableStream): void;
~~~~~~
node_modules/clime/bld/core/object.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.
1 /// <reference types="node" />
~~~~
node_modules/clime/bld/core/object.d.ts:5:19 - error TS2503: Cannot find namespace 'NodeJS'.
5 print(stdout: NodeJS.WritableStream, stderr: NodeJS.WritableStream): Promise<void> | void;
~~~~~~
node_modules/clime/bld/core/object.d.ts:5:50 - error TS2503: Cannot find namespace 'NodeJS'.
5 print(stdout: NodeJS.WritableStream, stderr: NodeJS.WritableStream): Promise<void> | void;
~~~~~~
node_modules/mt940-js/lib/index.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.
1 /// <reference types="node" />
~~~~
node_modules/mt940-js/lib/index.d.ts:55:51 - error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.
55 export declare function read(input: ArrayBuffer | Buffer, options?: ReadOptions): Promise<Statement[]>;
~~~~~~
node_modules/villa/bld/awaitable.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.
1 /// <reference types="node" />
~~~~
node_modules/villa/bld/awaitable.d.ts:2:30 - error TS2307: Cannot find module 'child_process'.
2 import { ChildProcess } from 'child_process';
~~~~~~~~~~~~~~~
node_modules/villa/bld/awaitable.d.ts:3:30 - error TS2307: Cannot find module 'events'.
3 import { EventEmitter } from 'events';
~~~~~~~~
node_modules/villa/bld/awaitable.d.ts:4:36 - error TS2307: Cannot find module 'stream'.
4 import { Readable, Writable } from 'stream';
~~~~~~~~
node_modules/winston-transport/index.d.ts:6:23 - error TS2688: Cannot find type definition file for 'node'.
6 /// <reference types="node" />
~~~~
node_modules/winston-transport/index.d.ts:8:25 - error TS2307: Cannot find module 'stream'.
8 import * as stream from 'stream';
~~~~~~~~
node_modules/winston/index.d.ts:4:23 - error TS2688: Cannot find type definition file for 'node'.
4 /// <reference types="node" />
~~~~
node_modules/winston/index.d.ts:6:31 - error TS2307: Cannot find module 'stream'.
6 import * as NodeJSStream from "stream";
~~~~~~~~
node_modules/winston/index.d.ts:121:28 - error TS2503: Cannot find namespace 'NodeJS'.
121 stream(options?: any): NodeJS.ReadableStream;
~~~~~~
node_modules/winston/index.d.ts:165:34 - error TS2503: Cannot find namespace 'NodeJS'.
165 let stream: (options?: any) => NodeJS.ReadableStream;
~~~~~~
node_modules/winston/lib/winston/config/index.d.ts:4:23 - error TS2688: Cannot find type definition file for 'node'.
4 /// <reference types="node" />
~~~~
node_modules/winston/lib/winston/transports/index.d.ts:4:23 - error TS2688: Cannot find type definition file for 'node'.
4 /// <reference types="node" />
~~~~
node_modules/winston/lib/winston/transports/index.d.ts:6:21 - error TS2307: Cannot find module 'http'.
6 import {Agent} from "http";
~~~~~~
node_modules/winston/lib/winston/transports/index.d.ts:31:14 - error TS2503: Cannot find namespace 'NodeJS'.
31 stream?: NodeJS.WritableStream;
~~~~~~
node_modules/winston/lib/winston/transports/index.d.ts:77:13 - error TS2503: Cannot find namespace 'NodeJS'.
77 stream: NodeJS.WritableStream;
~~~~~~
src/index.ts:2:23 - error TS2307: Cannot find module 'path'.
2 import * as path from "path";
~~~~~~
src/index.ts:5:40 - error TS2304: Cannot find name '__dirname'.
5 const cli = new CLI("fints", path.join(__dirname, "commands"));
~~~~~~~~~
src/index.ts:7:14 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.
7 shim.execute(process.argv);
~~~~~~~
Found 34 errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sta/.npm/_logs/2019-02-20T00_31_31_445Z-debug.log
Hi,
first off, thanks for developing this awesome fints-library! It's the first client which just works out of the box without hacking around and finding hidden flags and requirements...
I implemented the HKSAL and corresponding HISAL event successfully. But now I have some questions before I can submit this as PR.
Thanks!
The documentation states that a registration is necessary, but not where to do so and where to specify the productId.
The PinTanClient has an optional field productId
where I could put the productId, but since ~2018 FinTS made the productId mandatory so it would be nice to update the PinTanClient to make the productId also mandatory.
Also a link in the documentation to https://www.hbci-zka.de/register/prod_register.htm, where you can get a productId, would be nice.
I found the information in https://github.com/libfintx/libfintx/issues/53 where the author of libfintx also kindly provided his registration number to use.
When trying to run fints-cli with winston 3.2.1 installed it fails because of this error:
TypeError: self._addDefaultMeta is not a function
at Object.DerivedLogger.(anonymous function) [as verbose] (.../fints/node_modules/winston/lib/winston/create-logger.js:80:14)
at HttpConnection.<anonymous> (.../fints/dist/http-connection.js:38:22)
at Generator.next (<anonymous>)
at .../fints/dist/http-connection.js:7:71
at new Promise (<anonymous>)
at __awaiter (.../fints/dist/http-connection.js:3:12)
at HttpConnection.send (.../fints/dist/http-connection.js:36:16)
at Dialog.<anonymous> (.../fints/dist/dialog.js:132:52)
at Generator.next (<anonymous>)
at .../fints/dist/dialog.js:7:71
It seems this is a Problem in winston that will not get fixed:
winstonjs/winston#1591
With the latest version I encountered the error Unimplemented TAN method version 7 encountered.
I could fix this by manually adding version 7 in hitans.ts
if (![1, 2, 3, 4, 5, 6,7].includes(this.version)) {
throw new Error(`Unimplemented TAN method version ${this.version} encountered.`);
}
and in tan-method.ts
(just copied the code for version 6)
tanMethodArgumentMap.set(7, [
"securityFunction",
"tanProcess",
"techId",
"zkaId",
"zkaVersion",
"name",
"maxLengthInput",
"allowedFormat",
"textReturnvalue",
"maxLengthReturnvalue",
"multiple",
"tanTimeDialogAssociation",
"cancellable",
"smsChargeAccountRequired",
"principalAccountRequired",
"challengeClassRequired",
"challengeStructured",
"initializationMode",
"descriptionRequired",
"hhdUcRequired",
"supportedMediaNumber",
]);
This works at least for client.accounts() where no tan is required, I haven't tested it yet with use cases where an actuall tan is required.
My client configuration was for Sparkasse Nürnberg
, don't know if this works for other banks as well:
const client = new PinTanClient({
url: "https://banking-by1.s-fints-pt-by.de/fints30",
name: "...",
pin: "...",
blz: "76050101",
debug: true,
productId: '...',
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.