1- import {
2- type SepaAccountParameters ,
3- SepaAccountParametersGroup ,
4- } from '../dataGroups/SepaAccountParameters.js' ;
1+ import { AlphaNumeric } from '../dataElements/AlphaNumeric.js' ;
2+ import { Numeric } from '../dataElements/Numeric.js' ;
3+ import { YesNo } from '../dataElements/YesNo.js' ;
54import {
65 BusinessTransactionParameter ,
76 type BusinessTransactionParameterSegment ,
87} from './businessTransactionParameter.js' ;
98
10- export type HISPASSegment = BusinessTransactionParameterSegment < SepaAccountParameters > ;
9+ export type HISPASSegment = BusinessTransactionParameterSegment < HISPASParameter > ;
1110
12- export type HISPASParameter = SepaAccountParameters ;
11+ export type HISPASParameter = {
12+ individualAccountRetrievalAllowed : boolean ;
13+ nationalAccountAllowed : boolean ;
14+ structuredPurposeAllowed : boolean ;
15+ maxEntriesAllowed ?: boolean ; // version 2+
16+ reservedPurposePositions ?: number ; // version 3+
17+ supportedSepaFormats ?: string [ ] ; // optional, up to 99 entries
18+ } ;
1319
1420/**
1521 * Parameters for HKSPA business transaction - SEPA account connection request
@@ -22,7 +28,14 @@ export class HISPAS extends BusinessTransactionParameter {
2228 constructor ( ) {
2329 super (
2430 HISPAS . Id ,
25- [ new SepaAccountParametersGroup ( 'sepaAccountParams' , 1 , 1 ) ] ,
31+ [
32+ new YesNo ( 'individualAccountRetrievalAllowed' , 1 , 1 ) ,
33+ new YesNo ( 'nationalAccountAllowed' , 1 , 1 ) ,
34+ new YesNo ( 'structuredPurposeAllowed' , 1 , 1 ) ,
35+ new YesNo ( 'maxEntriesAllowed' , 1 , 1 , 2 ) , // version 2+
36+ new Numeric ( 'reservedPurposePositions' , 1 , 1 , 2 , 3 ) , // version 3+
37+ new AlphaNumeric ( 'supportedSepaFormats' , 0 , 99 , 256 ) , // optional, up to 99 entries
38+ ] ,
2639 1 , // secClassMinVersion
2740 ) ;
2841 }
0 commit comments