Options
All
  • Public
  • Public/Protected
  • All
Menu

fints

Index

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

Direction

Direction: "bi" | "in" | "out"

Variables

Const COMPRESSION_NONE

COMPRESSION_NONE: 0 = 0

Const COUNTRY_CODE

COUNTRY_CODE: 280 = 280

Const HBCI_VERSION

HBCI_VERSION: 300 = 300

Const HEADER_LENGTH

HEADER_LENGTH: 29 = 29

Const LANG_DE

LANG_DE: 1 = 1

Const LANG_EN

LANG_EN: 2 = 2

Const LANG_FR

LANG_FR: 3 = 3

Const PRODUCT_NAME

PRODUCT_NAME: "fints" = "fints"

Const PRODUCT_VERSION

PRODUCT_VERSION: "0.1" = "0.1"

Const SECURITY_BOUNDARY

SECURITY_BOUNDARY: 1 = 1

Const SECURITY_FUNCTION

SECURITY_FUNCTION: "999" = "999"

Const SECURITY_SUPPLIER_ROLE

SECURITY_SUPPLIER_ROLE: 1 = 1

Const SYNC_MODE_LAST_MSG_NUMBER

SYNC_MODE_LAST_MSG_NUMBER: 1 = 1

Const SYNC_MODE_NEW_CUSTOMER_ID

SYNC_MODE_NEW_CUSTOMER_ID: 0 = 0

Const SYNC_MODE_SIGNATURE_ID

SYNC_MODE_SIGNATURE_ID: 2 = 2

Const accountNumber

accountNumber: "01234" = "01234"

Const availableBalance

availableBalance: 2124.75 = 2124.75

Const bic

bic: "DEUTDEFF500" = "DEUTDEFF500"

Const blz

blz: "12345678" = "12345678"

Const bookedBalance

bookedBalance: 2024.75 = 2024.75

Let client

client: PinTanClient

Const creditLimit

creditLimit: 100 = 100

Const detectionRegex

detectionRegex: RegExp = /(?:^|\?)(..)(.*?)(?:$|\?)/g

Const iban

iban: "DE27100777770209299700" = "DE27100777770209299700"

Const logger

logger: Logger = createLogger()

Const name

name: "test1" = "test1"

Const pendingBalance

pendingBalance: 23.02 = 23.02

Const pin

pin: "12345" = "12345"

Const productId

productId: "fints" = "fints"

Const tanMethodArgumentMap

tanMethodArgumentMap: Map<number, string[]> = new Map<number, string[]>()

Const testData

testData: (object | object | object)[] = [{str: "105?00FOLGELASTSCHRIFT?109248?20EREF+1003760276550 PP.7723.?21PP PAYPAL?22MREF+5Z7J224S5B3QS?23CRED+LU96ZZZ000000000000000?240058?25SVWZ+PP.7723.PP . GOOGLE, I?26hr Einkauf bei GOOGLE?30DEUTDEFFXXX?31DE88500700100175526303?32PayPal (Europe) S.a.r.l. et?33 Cie., S.C.A.?34992", // tslint:disable-lineparsed: {bic: "DEUTDEFFXXX",iban: "DE88500700100175526303",reference: {creditorId: "LU96ZZZ0000000000000000058",endToEndRef: "1003760276550 PP.7723.PP PAYPAL",mandateRef: "5Z7J224S5B3QS",text: "PP.7723.PP . GOOGLE, Ihr Einkauf bei GOOGLE",raw: "EREF+1003760276550 PP.7723.PP PAYPALMREF+5Z7J224S5B3QSCRED+LU96ZZZ0000000000000000058SVWZ+PP.7723.PP . GOOGLE, Ihr Einkauf bei GOOGLE", // tslint:disable-line},primaNota: "9248",name: "PayPal (Europe) S.a.r.l. et Cie., S.C.A.",text: "FOLGELASTSCHRIFT",},},{str: "008?00DAUERAUFTRAG?100599?20Miete November?3010020030?31234567?32MUELLER?34339",parsed: {bic: "10020030",iban: "234567",reference: { raw: "Miete November" },name: "MUELLER",text: "DAUERAUFTRAG",primaNota: "0599",},},{str: "051?00UEBERWEISUNG?100599?20Gehalt Oktober\n?21Firma Mustermann GmbH?3050060400?310847564700?32MUELLER?34339", // tslint:disable-lineparsed: {bic: "50060400",iban: "0847564700",reference: { raw: "Gehalt Oktober\nFirma Mustermann GmbH" },name: "MUELLER",text: "UEBERWEISUNG",primaNota: "0599",},},{str: "177?00ONLINE-UEBERWEISUNG?109310?20KREF+1053050069-20180829182?21432?22SVWZ+KMC Huellen?23DATUM 29.08.2018, 18.25 UHR?241.TAN 389252?30COBADEFFXXX?31DE32250400660167600600?32Players-Point GbR?34997", // tslint:disable-lineparsed: {bic: "COBADEFFXXX",iban: "DE32250400660167600600",reference: {customerRef: "1053050069-20180829182432",date: new Date("2018-08-29T18:25:00.000Z"),text: "KMC Huellen",raw: "KREF+1053050069-20180829182432SVWZ+KMC HuellenDATUM 29.08.2018, 18.25 UHR1.TAN 389252",tan: {num: 1,value: "389252",},},primaNota: "9310",name: "Players-Point GbR",text: "ONLINE-UEBERWEISUNG",},},]

Const url

url: "https://example.com/fints" = "https://example.com/fints"

Functions

SegmentClass

  • Create a base class for segments, inheriting from Segment and the segment's props.

    Type parameters

    Parameters

    Returns Constructable<TProps & Segment<TProps>>

assemblePaymentReference

  • If the payment reference follows the SEPA tagging system, parse the information. See: https://tinyurl.com/ycdfx5hd

    Parameters

    • references: Section[]

      A list of all sections used for payment reference (20 - 29 and 60 - 63).

    Returns PaymentReference

    A parsed payment reference with all extracted data.

decodeBase64

  • decodeBase64(input: string): string
  • Decode a base 64 encoded string received from a fints server. Fints uses ISO-8859-1 encoding which will be converted into UTF-8.

    Parameters

    • input: string

      The string to decode.

    Returns string

    The decoded string.

encodeBase64

  • encodeBase64(input: string): string
  • Base 64 encode a string for use with fints. Fints uses ISO-8859-1 encoding which will be the encoding used in the base 64 data.

    Parameters

    • input: string

      The string to encode.

    Returns string

    The encoded string.

Const error

  • error(...args: any[]): any
  • Parameters

    • Rest ...args: any[]

    Returns any

escapeFinTS

  • escapeFinTS(content: string): string
  • Escape a string into fints representation.

    Parameters

    • content: string

      The string to escape.

    Returns string

    The escaped string.

is86Structured

  • is86Structured(input: string): boolean
  • Used to sniff whether the 86 section of the MT940 statement list supports the fints structured representation.

    Parameters

    • input: string

      The string for the 86 section.

    Returns boolean

    Whether the string is likely structured.

leftPad

  • leftPad(str: string, count: number, character?: string): string
  • Fill up the string with the specified character from the left.

    Parameters

    • str: string

      String to pad.

    • count: number

      Limit to which the string should be padded.

    • Default value character: string = "0"

      Character to pad the string with. Defaults to "0".

    Returns string

    The padded string.

parse

  • parse(input: string): string[][][]
  • Parse a full fints message into a set of segments containing a set of data groups containing a set of data elements. Can be parsed further by using segment classes. Bit strings with length will be resolved here.

    Parameters

    • input: string

      The string to parse.

    Returns string[][][]

    Set of segments.

parse86Structured

  • Parse as much information as possible from the structured 86 section of a MT940 statement list. Use is86Structured to sniff whether the payment reference is parsable.

    Parameters

    • input: string

      The input string for the 86 section to parse.

    Returns StructuredDescription

    The parsed structured description.

parsePaymentReferenceDate

  • parsePaymentReferenceDate(content: string): Date
  • Parses a commonly used date format ("DATUM 15.11.2018, 12:00 UHR") into a date

    Parameters

    • content: string

      The date string to parse.

    Returns Date

    The parsed date.

parsePaymentReferenceTan

  • parsePaymentReferenceTan(content: string): object
  • Parses a commonly format for representing a TAN related to a transaction ("1. TAN 123456").

    Parameters

    • content: string

      The string to parse.

    Returns object

    The parsed TAN number and TAN iteself.

    • num: number
    • value: string

testSegment

  • Parameters

    Returns void

unescapeFinTS

  • unescapeFinTS(content: string): string
  • Unescape a string from fints representation.

    Parameters

    • content: string

      The string to unescape.

    Returns string

    The unescaped string.

Const verbose

  • verbose(...args: any[]): any
  • Parameters

    • Rest ...args: any[]

    Returns any

Const warn

  • warn(...args: any[]): any
  • Parameters

    • Rest ...args: any[]

    Returns any

Object literals

Const Format

Format: object

A set of utilities for formatting data into the fints data formats.

bool

  • bool(value: boolean): "J" | ""
  • Format a boolean with no false representation.

    Parameters

    • value: boolean

      The boolean to format.

    Returns "J" | ""

    The formatted string.

date

  • date(date?: Date): string
  • Format a date. The time part is ignored.

    Parameters

    • Optional date: Date

      The date to format.

    Returns string

    The formatted string.

dig

  • dig(num: number): string
  • Format a set of digits.

    Parameters

    • num: number

      The number to format.

    Returns string

    The formatted string.

empty

  • empty(): string
  • Return an empty string.

    Returns string

    An empty string.

jn

  • jn(bool: boolean): "J" | "N"
  • Format a boolean with an explicit false representation (named "JN" in the official documentation).

    Parameters

    • bool: boolean

    Returns "J" | "N"

    The formatted string.

num

  • num(num: number): string
  • Format a number.

    Parameters

    • num: number

      The number to format.

    Returns string

    The formatted string.

sepaDescriptor

  • sepaDescriptor(): string
  • Return the SEPA identification descriptor.

    Returns string

    The SEPA identification descriptor.

stringEscaped

  • stringEscaped(str: string): string
  • Format a normal string, escaping all control characters.

    Parameters

    • str: string

      The string to format.

    Returns string

    The formatted string.

stringWithLength

  • stringWithLength(str: string): string
  • Format a binary string with a length specification.

    Parameters

    • str: string

      The string to format.

    Returns string

    The formatted string.

time

  • time(date?: Date): string
  • Format a time. The date part is ignored.

    Parameters

    • Optional date: Date

      The date to format.

    Returns string

    The formatted string.

Const Parse

Parse: object

A set of utilities for parsing data from the fints data formats.

bool

  • bool(str: string): boolean
  • Parse a boolean (JN).

    Parameters

    • str: string

      The string to parse.

    Returns boolean

    The parsed boolean.

challengeHhdUc

  • challengeHhdUc(str: string[][]): [string, Buffer]
  • Parameters

    • str: string[][]

    Returns [string, Buffer]

date

  • date(str: string): Date
  • Parse a date.

    Parameters

    • str: string

      The string or date to parse.

    Returns Date

    The parsed date.

dig

  • dig(str: string): number
  • Parse a set of digits.

    Parameters

    • str: string

      The string to parse.

    Returns number

    The parsed number.

num

  • num(str: string): number
  • Parse a number.

    Parameters

    • str: string

      The string to parse.

    Returns number

    The parsed number.

xml

  • xml(str: string): unknown
  • Parse a xml document to an object.

    Parameters

    • str: string

      The xml parse.

    Returns unknown

    The parsed object.

Const account

account: object

accountNumber

accountNumber: string = "01234"

bic

bic: string = "DEUTDEFF500"

blz

blz: string = "12345678"

iban

iban: string = "DE27100777770209299700"

Const standingOrder

standingOrder: object

amount

amount: number = 90.2

creationDate

creationDate: Date = new Date("2014-12-01T00:00:00")

interval

interval: number = 1

lastOrderDate

lastOrderDate: Date = new Date("2020-06-30T00:00:00")

nextOrderDate

nextOrderDate: Date = new Date("2019-01-31")

orderDay

orderDay: number = 29

paymentPurpose

paymentPurpose: string = "Common Order"

timeUnit

timeUnit: string = "M"

creditor

creditor: object

bic

bic: string = "DEU1GFAS800"

iban

iban: string = "DE58140369180198038800"

name

name: string = "John Doe"

debitor

debitor: object

bic

bic: string = "DEUTDEFF500"

iban

iban: string = "DE27100777770209299700"

name

name: string = "Max Mustermann"

Generated using TypeDoc