Git Product home page Git Product logo

fints's People

Contributors

as19git67 avatar ckotzbauer avatar guidomueller avatar mathiasarens avatar prior99 avatar svenstaro avatar takahser avatar valoricde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fints's Issues

can't build cli project

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

Questions for contributing

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.

  1. In the segment unit-tests and the fixtures for the client-tests there are several raw protocol strings. Where do they come from? Are they generated or manually constructed? If last one, is there a good specification for the structure of those messages?
  2. Are there any special naming conventions for public accessible property names (e.g. return values)?

Thanks!

Documentation unclear on product registration.

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.

fints-cli does not work with winston 3.2.1

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

Unimplemented TAN method version 7 encountered.

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: '...',
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.