@lucianpacurar/iso20022.js 0.2.11 → 0.2.13

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.
package/dist/index.d.ts CHANGED
@@ -519,15 +519,71 @@ declare const ACHLocalInstrumentCodeDescriptionMap: {
519
519
  readonly BOC: "Back Office Conversion";
520
520
  readonly RCK: "Represented Check Entry";
521
521
  };
522
+ /**
523
+ * SEPA Direct Debit Local Instrument Codes.
524
+ * Defines the type of SEPA direct debit scheme.
525
+ */
526
+ type SEPALocalInstrument = 'CORE' | 'B2B';
527
+ /**
528
+ * SEPA Direct Debit Sequence Type Codes.
529
+ * Indicates the position of a direct debit transaction in a series of recurring direct debits.
530
+ * - FRST: First collection in a series of recurring direct debits
531
+ * - RCUR: Recurring collection in a series of recurring direct debits
532
+ * - OOFF: One-off direct debit collection
533
+ * - FNAL: Final collection in a series of recurring direct debits
534
+ */
535
+ type SEPASequenceType = 'FRST' | 'RCUR' | 'OOFF' | 'FNAL';
536
+ /**
537
+ * Information about amendments made to a direct debit mandate.
538
+ */
539
+ interface MandateAmendmentInformation {
540
+ /** Original mandate identification before amendment */
541
+ originalMandateId?: string;
542
+ /** Original creditor scheme identification before amendment */
543
+ originalCreditorSchemeId?: {
544
+ name?: string;
545
+ id?: string;
546
+ };
547
+ /** Original debtor before amendment */
548
+ originalDebtor?: Party;
549
+ /** Original debtor account before amendment */
550
+ originalDebtorAccount?: Account;
551
+ }
552
+ /**
553
+ * Direct debit mandate information.
554
+ * A mandate is an authorization from a debtor allowing a creditor to collect payments.
555
+ */
556
+ interface MandateInformation {
557
+ /** Unique mandate identification */
558
+ mandateId: string;
559
+ /** Date when the mandate was signed by the debtor */
560
+ dateOfSignature: Date;
561
+ /** Indicates whether the mandate has been amended */
562
+ amendmentIndicator: boolean;
563
+ /** Amendment details if the mandate has been amended */
564
+ amendmentInformation?: MandateAmendmentInformation;
565
+ }
566
+ /**
567
+ * Represents a SEPA direct debit payment instruction.
568
+ */
569
+ interface SEPADirectDebitPaymentInstruction extends PaymentInstruction {
570
+ type?: 'sepa';
571
+ direction?: 'debit';
572
+ currency: 'EUR';
573
+ /** The party being debited (money is collected from this party) */
574
+ debtor: Party;
575
+ /** Mandate information authorizing the direct debit */
576
+ mandate: MandateInformation;
577
+ }
522
578
 
523
579
  /**
524
580
  * Abstract base class for ISO20022 payment initiation (PAIN) messages.
525
581
  * @abstract
526
582
  */
527
583
  declare abstract class PaymentInitiation {
528
- type: "swift" | "rtp" | "sepa" | "ach";
584
+ type: 'swift' | 'rtp' | 'sepa' | 'ach';
529
585
  constructor({ type }: {
530
- type: "swift" | "rtp" | "sepa" | "ach";
586
+ type: 'swift' | 'rtp' | 'sepa' | 'ach';
531
587
  });
532
588
  /**
533
589
  * Serializes the payment initiation to a string format.
@@ -624,7 +680,7 @@ declare abstract class PaymentInitiation {
624
680
  static getBuilder(): XMLBuilder;
625
681
  }
626
682
 
627
- type AtLeastOne$5<T> = [T, ...T[]];
683
+ type AtLeastOne$6<T> = [T, ...T[]];
628
684
  /**
629
685
  * Configuration for SWIFT Credit Payment Initiation.
630
686
  *
@@ -637,7 +693,7 @@ interface SWIFTCreditPaymentInitiationConfig$1 {
637
693
  /** The party initiating the payment. */
638
694
  initiatingParty: Party;
639
695
  /** An array of payment instructions. */
640
- paymentInstructions: AtLeastOne$5<SWIFTCreditPaymentInstruction>;
696
+ paymentInstructions: AtLeastOne$6<SWIFTCreditPaymentInstruction>;
641
697
  /** Optional unique identifier for the message. If not provided, a UUID will be generated. */
642
698
  messageId?: string;
643
699
  /** Optional creation date for the message. If not provided, current date will be used. */
@@ -694,7 +750,7 @@ declare class SWIFTCreditPaymentInitiation extends PaymentInitiation {
694
750
  serialize(): string;
695
751
  }
696
752
 
697
- type AtLeastOne$4<T> = [T, ...T[]];
753
+ type AtLeastOne$5<T> = [T, ...T[]];
698
754
  /**
699
755
  * Configuration for SEPA Credit Payment Initiation.
700
756
  *
@@ -708,7 +764,7 @@ interface SEPACreditPaymentInitiationConfig$1 {
708
764
  /** The party initiating the SEPA credit transfer. */
709
765
  initiatingParty: Party;
710
766
  /** An array containing at least one payment instruction for SEPA credit transfer. */
711
- paymentInstructions: AtLeastOne$4<SEPACreditPaymentInstruction>;
767
+ paymentInstructions: AtLeastOne$5<SEPACreditPaymentInstruction>;
712
768
  /** Optional unique identifier for the message. If not provided, a UUID will be generated. */
713
769
  messageId?: string;
714
770
  /** Optional creation date for the message. If not provided, current date will be used. */
@@ -741,7 +797,7 @@ declare class SEPACreditPaymentInitiation extends PaymentInitiation {
741
797
  initiatingParty: Party;
742
798
  messageId: string;
743
799
  creationDate: Date;
744
- paymentInstructions: AtLeastOne$4<SEPACreditPaymentInstruction>;
800
+ paymentInstructions: AtLeastOne$5<SEPACreditPaymentInstruction>;
745
801
  paymentInformationId: string;
746
802
  categoryPurpose?: ExternalCategoryPurpose;
747
803
  private formattedPaymentSum;
@@ -818,7 +874,7 @@ declare class SEPACreditPaymentInitiation extends PaymentInitiation {
818
874
  static fromXML(rawXml: string): SEPACreditPaymentInitiation;
819
875
  }
820
876
 
821
- type AtLeastOne$3<T> = [T, ...T[]];
877
+ type AtLeastOne$4<T> = [T, ...T[]];
822
878
  /**
823
879
  * Represents a group of payment instructions for a single debtor (PmtInf block).
824
880
  *
@@ -830,9 +886,11 @@ interface SEPAMultiCreditPaymentInstructionGroup {
830
886
  /** The party (debtor) for this specific payment information block. */
831
887
  initiatingParty: Party;
832
888
  /** An array containing at least one payment instruction for this debtor. */
833
- payments: AtLeastOne$3<SEPACreditPaymentInstruction>;
889
+ payments: AtLeastOne$4<SEPACreditPaymentInstruction>;
834
890
  /** Optional category purpose code for this payment information block. */
835
891
  categoryPurpose?: ExternalCategoryPurpose;
892
+ /** Indicates whether transactions should be booked in batch. Defaults to false. */
893
+ batchBooking?: boolean;
836
894
  }
837
895
  /**
838
896
  * Configuration for SEPA Multi Credit Payment Initiation.
@@ -846,7 +904,7 @@ interface SEPAMultiCreditPaymentInitiationConfig$1 {
846
904
  /** The top-level party initiating the message (used in GrpHdr). */
847
905
  initiatingParty: Party;
848
906
  /** An array containing at least one payment instruction group. */
849
- paymentInstructions: AtLeastOne$3<SEPAMultiCreditPaymentInstructionGroup>;
907
+ paymentInstructions: AtLeastOne$4<SEPAMultiCreditPaymentInstructionGroup>;
850
908
  /** Optional unique identifier for the message. If not provided, a UUID will be generated. */
851
909
  messageId?: string;
852
910
  /** Optional creation date for the message. If not provided, current date will be used. */
@@ -881,8 +939,7 @@ declare class SEPAMultiCreditPaymentInitiation extends PaymentInitiation {
881
939
  initiatingParty: Party;
882
940
  messageId: string;
883
941
  creationDate: Date;
884
- paymentInstructions: AtLeastOne$3<SEPAMultiCreditPaymentInstructionGroup>;
885
- paymentInformationIdBase: string;
942
+ paymentInstructions: AtLeastOne$4<SEPAMultiCreditPaymentInstructionGroup>;
886
943
  private formattedPaymentSum;
887
944
  private totalTransactionCount;
888
945
  /**
@@ -975,7 +1032,7 @@ declare class SEPAMultiCreditPaymentInitiation extends PaymentInitiation {
975
1032
  static fromXML(rawXml: string): SEPAMultiCreditPaymentInitiation;
976
1033
  }
977
1034
 
978
- type AtLeastOne$2<T> = [T, ...T[]];
1035
+ type AtLeastOne$3<T> = [T, ...T[]];
979
1036
  /**
980
1037
  * Configuration for RTP Credit Payment Initiation.
981
1038
  *
@@ -988,7 +1045,7 @@ interface RTPCreditPaymentInitiationConfig$1 {
988
1045
  /** The party initiating the RTP credit transfer. */
989
1046
  initiatingParty: Party;
990
1047
  /** Array containing at least one payment instruction for the RTP credit transfer. */
991
- paymentInstructions: AtLeastOne$2<RTPCreditPaymentInstruction>;
1048
+ paymentInstructions: AtLeastOne$3<RTPCreditPaymentInstruction>;
992
1049
  /** Optional unique identifier for the message. If not provided, a UUID will be generated. */
993
1050
  messageId?: string;
994
1051
  /** Optional creation date for the message. If not provided, current date will be used. */
@@ -1017,7 +1074,7 @@ interface RTPCreditPaymentInitiationConfig$1 {
1017
1074
  */
1018
1075
  declare class RTPCreditPaymentInitiation extends PaymentInitiation {
1019
1076
  initiatingParty: Party;
1020
- paymentInstructions: AtLeastOne$2<RTPCreditPaymentInstruction>;
1077
+ paymentInstructions: AtLeastOne$3<RTPCreditPaymentInstruction>;
1021
1078
  messageId: string;
1022
1079
  creationDate: Date;
1023
1080
  paymentInformationId: string;
@@ -1091,7 +1148,7 @@ declare class RTPCreditPaymentInitiation extends PaymentInitiation {
1091
1148
  static fromXML(rawXml: string): RTPCreditPaymentInitiation;
1092
1149
  }
1093
1150
 
1094
- type AtLeastOne$1<T> = [T, ...T[]];
1151
+ type AtLeastOne$2<T> = [T, ...T[]];
1095
1152
  /**
1096
1153
  * Configuration for ACH Credit Payment Initiation.
1097
1154
  *
@@ -1104,7 +1161,7 @@ interface ACHCreditPaymentInitiationConfig$1 {
1104
1161
  /** The party initiating the ACH credit transfer. */
1105
1162
  initiatingParty: Party;
1106
1163
  /** Array containing at least one payment instruction for the ACH credit transfer. */
1107
- paymentInstructions: AtLeastOne$1<ACHCreditPaymentInstruction>;
1164
+ paymentInstructions: AtLeastOne$2<ACHCreditPaymentInstruction>;
1108
1165
  /** Optional unique identifier for the message. If not provided, a UUID will be generated. */
1109
1166
  messageId?: string;
1110
1167
  /** Optional creation date for the message. If not provided, current date will be used. */
@@ -1159,7 +1216,7 @@ interface ACHCreditPaymentInitiationConfig$1 {
1159
1216
  */
1160
1217
  declare class ACHCreditPaymentInitiation extends PaymentInitiation {
1161
1218
  initiatingParty: Party;
1162
- paymentInstructions: AtLeastOne$1<ACHCreditPaymentInstruction>;
1219
+ paymentInstructions: AtLeastOne$2<ACHCreditPaymentInstruction>;
1163
1220
  messageId: string;
1164
1221
  creationDate: Date;
1165
1222
  paymentInformationId: string;
@@ -1248,6 +1305,201 @@ declare class ACHCreditPaymentInitiation extends PaymentInitiation {
1248
1305
  static fromXML(rawXml: string): ACHCreditPaymentInitiation;
1249
1306
  }
1250
1307
 
1308
+ type AtLeastOne$1<T> = [T, ...T[]];
1309
+ /**
1310
+ * Represents a group of direct debit payment instructions for a single creditor (PmtInf block).
1311
+ *
1312
+ * @property {Party} creditor - The party collecting money from debtors.
1313
+ * @property {string} creditorSchemeId - The creditor's SEPA scheme identifier (e.g., "DE96ZZZ00000345986").
1314
+ * @property {AtLeastOne<SEPADirectDebitPaymentInstruction>} payments - An array containing at least one payment instruction for this creditor.
1315
+ * @property {Date} requestedCollectionDate - The date when funds should be collected from all debtors in this group.
1316
+ * @property {SEPASequenceType} sequenceType - Sequence type indicating the position in a series of direct debits (FRST, RCUR, OOFF, FNAL).
1317
+ * @property {SEPALocalInstrument} [localInstrument] - The SEPA direct debit scheme (CORE or B2B). Defaults to 'CORE'.
1318
+ * @property {ExternalCategoryPurpose} [categoryPurpose] - Optional category purpose code for this payment information block.
1319
+ * @property {boolean} [batchBooking] - Indicates whether transactions should be booked in batch. Defaults to false.
1320
+ */
1321
+ interface SEPADirectDebitPaymentInstructionGroup {
1322
+ /** The party collecting money from debtors. */
1323
+ creditor: Party;
1324
+ /** The creditor's SEPA scheme identifier. */
1325
+ creditorSchemeId: string;
1326
+ /** An array containing at least one direct debit instruction. */
1327
+ payments: AtLeastOne$1<SEPADirectDebitPaymentInstruction>;
1328
+ /** The date when funds should be collected from all debtors. */
1329
+ requestedCollectionDate: Date;
1330
+ /** Sequence type for all transactions in this group (FRST, RCUR, OOFF, FNAL). */
1331
+ sequenceType: SEPASequenceType;
1332
+ /** The SEPA direct debit scheme (CORE or B2B). Defaults to 'CORE'. */
1333
+ localInstrument?: SEPALocalInstrument;
1334
+ /** Optional category purpose code for this payment information block. */
1335
+ categoryPurpose?: ExternalCategoryPurpose;
1336
+ /** Indicates whether transactions should be booked in batch. Defaults to false. */
1337
+ batchBooking?: boolean;
1338
+ }
1339
+ /**
1340
+ * Configuration for SEPA Direct Debit Payment Initiation.
1341
+ *
1342
+ * @property {Party} initiatingParty - The top-level party initiating the message (used in GrpHdr).
1343
+ * @property {AtLeastOne<SEPADirectDebitPaymentInstructionGroup>} paymentInstructions - An array containing at least one payment instruction group.
1344
+ * @property {string} [messageId] - Optional unique identifier for the message. If not provided, a UUID will be generated.
1345
+ * @property {Date} [creationDate] - Optional creation date for the message. If not provided, current date will be used.
1346
+ */
1347
+ interface SEPADirectDebitPaymentInitiationConfig$1 {
1348
+ /** The top-level party initiating the message (used in GrpHdr). */
1349
+ initiatingParty: Party;
1350
+ /** An array containing at least one payment instruction group. */
1351
+ paymentInstructions: AtLeastOne$1<SEPADirectDebitPaymentInstructionGroup>;
1352
+ /** Optional unique identifier for the message. If not provided, a UUID will be generated. */
1353
+ messageId?: string;
1354
+ /** Optional creation date for the message. If not provided, current date will be used. */
1355
+ creationDate?: Date;
1356
+ }
1357
+ /**
1358
+ * Represents a SEPA Direct Debit Payment Initiation.
1359
+ * This class handles the creation and serialization of SEPA direct debit messages
1360
+ * with multiple payment information blocks (multiple creditors) according to the ISO20022 pain.008 standard.
1361
+ * @class
1362
+ * @extends PaymentInitiation
1363
+ * @param {SEPADirectDebitPaymentInitiationConfig} config - The configuration for the SEPA Direct Debit Payment Initiation message.
1364
+ * @example
1365
+ * ```typescript
1366
+ * // Creating a SEPA direct debit message
1367
+ * const payment = new SEPADirectDebitPaymentInitiation({
1368
+ * initiatingParty: { name: 'Company Ltd', id: '12345' },
1369
+ * paymentInstructions: [
1370
+ * {
1371
+ * creditor: creditor1,
1372
+ * creditorSchemeId: 'DE96ZZZ00000345986',
1373
+ * requestedCollectionDate: new Date('2025-11-22'),
1374
+ * sequenceType: 'RCUR',
1375
+ * payments: [debit1, debit2]
1376
+ * }
1377
+ * ]
1378
+ * });
1379
+ * ```
1380
+ */
1381
+ declare class SEPADirectDebitPaymentInitiation extends PaymentInitiation {
1382
+ initiatingParty: Party;
1383
+ messageId: string;
1384
+ creationDate: Date;
1385
+ paymentInstructions: AtLeastOne$1<SEPADirectDebitPaymentInstructionGroup>;
1386
+ private formattedPaymentSum;
1387
+ private totalTransactionCount;
1388
+ /**
1389
+ * Creates an instance of SEPADirectDebitPaymentInitiation.
1390
+ * @param {SEPADirectDebitPaymentInitiationConfig} config - The configuration object for the SEPA direct debit.
1391
+ */
1392
+ constructor(config: SEPADirectDebitPaymentInitiationConfig$1);
1393
+ /**
1394
+ * Counts the total number of transactions across all payment instruction groups.
1395
+ * @private
1396
+ * @returns {number} The total count of all transactions.
1397
+ */
1398
+ private countAllTransactions;
1399
+ /**
1400
+ * Calculates the sum of all payment instructions across all groups.
1401
+ * @private
1402
+ * @returns {string} The total sum formatted as a string with 2 decimal places.
1403
+ */
1404
+ private sumAllPayments;
1405
+ /**
1406
+ * Validates the payment initiation data according to SEPA requirements.
1407
+ * @private
1408
+ * @throws {Error} If messageId exceeds 35 characters.
1409
+ * @throws {Error} If any group's payment instructions have different currencies.
1410
+ */
1411
+ private validate;
1412
+ /**
1413
+ * Validates that all payment instructions in a group have the same currency (EUR).
1414
+ * @private
1415
+ * @param {AtLeastOne<SEPADirectDebitPaymentInstruction>} payments - Array of payment instructions.
1416
+ * @throws {Error} If payment instructions have different currencies.
1417
+ */
1418
+ private validateGroupInstructionsHaveSameCurrency;
1419
+ /**
1420
+ * Generates payment information for a single SEPA direct debit transfer instruction.
1421
+ * @param {SEPADirectDebitPaymentInstruction} instruction - The payment instruction.
1422
+ * @returns {Object} The payment information object formatted according to SEPA direct debit specifications.
1423
+ */
1424
+ directDebitTransfer(instruction: SEPADirectDebitPaymentInstruction): {
1425
+ RmtInf?: {
1426
+ Ustrd: string;
1427
+ } | undefined;
1428
+ PmtId: {
1429
+ EndToEndId: string;
1430
+ };
1431
+ InstdAmt: {
1432
+ '#': string;
1433
+ '@Ccy': "EUR";
1434
+ };
1435
+ DrctDbtTx: {
1436
+ MndtRltdInf: {
1437
+ AmdmntInfDtls?: {
1438
+ OrgnlCdtrSchmeId?: {
1439
+ Id?: {
1440
+ PrvtId: {
1441
+ Othr: {
1442
+ Id: string;
1443
+ SchmeNm: {
1444
+ Prtry: string;
1445
+ };
1446
+ };
1447
+ };
1448
+ } | undefined;
1449
+ Nm?: string | undefined;
1450
+ } | undefined;
1451
+ OrgnlMndtId?: string | undefined;
1452
+ } | undefined;
1453
+ MndtId: string;
1454
+ DtOfSgntr: string;
1455
+ AmdmntInd: boolean;
1456
+ };
1457
+ };
1458
+ DbtrAgt: {
1459
+ FinInstnId: {
1460
+ BIC: string;
1461
+ ClrSysMmbId?: undefined;
1462
+ };
1463
+ } | {
1464
+ FinInstnId: {
1465
+ ClrSysMmbId: {
1466
+ ClrSysId: {
1467
+ Cd: string;
1468
+ };
1469
+ MmbId: string;
1470
+ };
1471
+ BIC?: undefined;
1472
+ };
1473
+ };
1474
+ Dbtr: any;
1475
+ DbtrAcct: {
1476
+ Id: {
1477
+ IBAN: string;
1478
+ };
1479
+ } | {
1480
+ Id: {
1481
+ Othr: {
1482
+ Id: string;
1483
+ };
1484
+ };
1485
+ };
1486
+ };
1487
+ /**
1488
+ * Serializes the SEPA direct debit initiation to an XML string.
1489
+ * @returns {string} The XML representation of the SEPA direct debit initiation.
1490
+ */
1491
+ serialize(): string;
1492
+ /**
1493
+ * Parses an XML string and creates a SEPADirectDebitPaymentInitiation instance.
1494
+ * Supports multiple PmtInf blocks in the XML document.
1495
+ * @param {string} rawXml - The XML string to parse.
1496
+ * @returns {SEPADirectDebitPaymentInitiation} A new instance created from the XML data.
1497
+ * @throws {InvalidXmlError} If the XML format is invalid.
1498
+ * @throws {InvalidXmlNamespaceError} If the namespace is not pain.008.
1499
+ */
1500
+ static fromXML(rawXml: string): SEPADirectDebitPaymentInitiation;
1501
+ }
1502
+
1251
1503
  type ISO20022MessageTypeName = `${string}.${string}`;
1252
1504
  interface GenericISO20022Message {
1253
1505
  /** serialize to XML string */
@@ -1688,6 +1940,72 @@ interface ACHCreditPaymentInitiationConfig {
1688
1940
  */
1689
1941
  creationDate?: Date;
1690
1942
  }
1943
+ /**
1944
+ * Configuration interface for SEPA Direct Debit Payment Initiation.
1945
+ * @interface SEPADirectDebitPaymentInitiationConfig
1946
+ * @example
1947
+ * const config: SEPADirectDebitPaymentInitiationConfig = {
1948
+ * paymentInstructions: [
1949
+ * {
1950
+ * creditor: {
1951
+ * name: 'Landlord Company Ltd',
1952
+ * account: {
1953
+ * iban: 'DE54120300001030860744',
1954
+ * },
1955
+ * agent: {
1956
+ * bic: 'BYLADEM1001',
1957
+ * },
1958
+ * },
1959
+ * creditorSchemeId: 'DE96ZZZ00000345986',
1960
+ * requestedCollectionDate: new Date('2025-11-22'),
1961
+ * sequenceType: 'RCUR',
1962
+ * payments: [
1963
+ * {
1964
+ * type: 'sepa',
1965
+ * direction: 'debit',
1966
+ * amount: 31700, // €317.00 Euros
1967
+ * currency: 'EUR',
1968
+ * debtor: {
1969
+ * name: 'John Doe',
1970
+ * account: {
1971
+ * iban: 'DE20120300001088243355',
1972
+ * },
1973
+ * agent: {
1974
+ * bic: 'BYLADEM1001',
1975
+ * },
1976
+ * },
1977
+ * mandate: {
1978
+ * mandateId: 'MR-12345-001',
1979
+ * dateOfSignature: new Date('2024-01-15'),
1980
+ * amendmentIndicator: false,
1981
+ * },
1982
+ * remittanceInformation: 'Rent payment November 2024',
1983
+ * },
1984
+ * ],
1985
+ * localInstrument: 'CORE', // Optional, defaults to CORE
1986
+ * },
1987
+ * ],
1988
+ * messageId: 'MSGID123', // Optional
1989
+ * creationDate: new Date(), // Optional
1990
+ * };
1991
+ */
1992
+ interface SEPADirectDebitPaymentInitiationConfig {
1993
+ /**
1994
+ * An array of payment instruction groups, each with its own creditor.
1995
+ * @type {AtLeastOne<SEPADirectDebitPaymentInstructionGroup>}
1996
+ */
1997
+ paymentInstructions: AtLeastOne<SEPADirectDebitPaymentInstructionGroup>;
1998
+ /**
1999
+ * Optional unique identifier for the message. If not provided, a UUID will be generated.
2000
+ * @type {string}
2001
+ */
2002
+ messageId?: string;
2003
+ /**
2004
+ * Optional creation date for the message. If not provided, current date will be used.
2005
+ * @type {Date}
2006
+ */
2007
+ creationDate?: Date;
2008
+ }
1691
2009
  /**
1692
2010
  * Represents an ISO20022 core message creator.
1693
2011
  * This class provides methods to create various basic ISO20022 compliant messages.
@@ -1871,6 +2189,57 @@ declare class ISO20022 {
1871
2189
  * @returns {ACHCreditPaymentInitiation} A new ACH Credit Payment Initiation object.
1872
2190
  */
1873
2191
  createACHCreditPaymentInitiation(config: ACHCreditPaymentInitiationConfig): ACHCreditPaymentInitiation;
2192
+ /**
2193
+ * Creates a SEPA Direct Debit Payment Initiation message.
2194
+ * @param {SEPADirectDebitPaymentInitiationConfig} config - Configuration containing payment instruction groups and optional parameters.
2195
+ * @example
2196
+ * const payment = iso20022.createSEPADirectDebitPaymentInitiation({
2197
+ * paymentInstructions: [
2198
+ * {
2199
+ * creditor: {
2200
+ * name: 'Landlord Company Ltd',
2201
+ * account: {
2202
+ * iban: 'DE54120300001030860744',
2203
+ * },
2204
+ * agent: {
2205
+ * bic: 'BYLADEM1001',
2206
+ * },
2207
+ * },
2208
+ * creditorSchemeId: 'DE96ZZZ00000345986',
2209
+ * requestedCollectionDate: new Date('2025-11-22'),
2210
+ * sequenceType: 'RCUR',
2211
+ * payments: [
2212
+ * {
2213
+ * type: 'sepa',
2214
+ * direction: 'debit',
2215
+ * amount: 31700, // €317.00 Euros
2216
+ * currency: 'EUR',
2217
+ * debtor: {
2218
+ * name: 'John Doe',
2219
+ * account: {
2220
+ * iban: 'DE20120300001088243355',
2221
+ * },
2222
+ * agent: {
2223
+ * bic: 'BYLADEM1001',
2224
+ * },
2225
+ * },
2226
+ * mandate: {
2227
+ * mandateId: 'MR-12345-001',
2228
+ * dateOfSignature: new Date('2024-01-15'),
2229
+ * amendmentIndicator: false,
2230
+ * },
2231
+ * remittanceInformation: 'Rent payment November 2024',
2232
+ * },
2233
+ * ],
2234
+ * localInstrument: 'CORE', // Optional
2235
+ * },
2236
+ * ],
2237
+ * messageId: 'DD-MSG-001', // Optional
2238
+ * creationDate: new Date('2025-03-01'), // Optional
2239
+ * });
2240
+ * @returns {SEPADirectDebitPaymentInitiation} A new SEPA Direct Debit Payment Initiation object.
2241
+ */
2242
+ createSEPADirectDebitPaymentInitiation(config: SEPADirectDebitPaymentInitiationConfig): SEPADirectDebitPaymentInitiation;
1874
2243
  /** Create a message CAMT or other */
1875
2244
  createMessage(type: ISO20022MessageTypeName, config: any): GenericISO20022Message;
1876
2245
  }
@@ -2131,4 +2500,4 @@ declare class InvalidXmlNamespaceError extends Iso20022JsError {
2131
2500
  constructor(message: string);
2132
2501
  }
2133
2502
 
2134
- export { type ABAAgent, ACHCreditPaymentInitiation, type ACHCreditPaymentInitiationConfig$1 as ACHCreditPaymentInitiationConfig, type ACHCreditPaymentInstruction, type ACHLocalInstrument, ACHLocalInstrumentCode, ACHLocalInstrumentCodeDescriptionMap, type Account, type Agent, type BICAgent, type Balance, type BalanceType, BalanceTypeCode, BalanceTypeCodeDescriptionMap, type BaseAccount, type BaseStatusInformation as BaseStatus, CashManagementEndOfDayReport, type Entry, type GroupStatusInformation as GroupStatus, type IBANAccount, ISO20022, InvalidXmlError, InvalidXmlNamespaceError, Iso20022JsError, type OriginalGroupInformation, type Party, type PaymentStatusInformation as PaymentStatus, PaymentStatusCode, PaymentStatusReport, RTPCreditPaymentInitiation, type RTPCreditPaymentInitiationConfig$1 as RTPCreditPaymentInitiationConfig, type RTPCreditPaymentInstruction, SEPACreditPaymentInitiation, type SEPACreditPaymentInitiationConfig$1 as SEPACreditPaymentInitiationConfig, type SEPACreditPaymentInstruction, SEPAMultiCreditPaymentInitiation, type SEPAMultiCreditPaymentInitiationConfig$1 as SEPAMultiCreditPaymentInitiationConfig, type SEPAMultiCreditPaymentInstructionGroup, SWIFTCreditPaymentInitiation, type SWIFTCreditPaymentInitiationConfig$1 as SWIFTCreditPaymentInitiationConfig, type SWIFTCreditPaymentInstruction, type Statement, type PaymentStatus as Status, type StatusInformation, type StatusType, type StructuredAddress, type Transaction, type TransactionStatusInformation as TransactionStatus };
2503
+ export { type ABAAgent, ACHCreditPaymentInitiation, type ACHCreditPaymentInitiationConfig$1 as ACHCreditPaymentInitiationConfig, type ACHCreditPaymentInstruction, type ACHLocalInstrument, ACHLocalInstrumentCode, ACHLocalInstrumentCodeDescriptionMap, type Account, type Agent, type BICAgent, type Balance, type BalanceType, BalanceTypeCode, BalanceTypeCodeDescriptionMap, type BaseAccount, type BaseStatusInformation as BaseStatus, CashManagementEndOfDayReport, type Entry, type GroupStatusInformation as GroupStatus, type IBANAccount, ISO20022, InvalidXmlError, InvalidXmlNamespaceError, Iso20022JsError, type MandateAmendmentInformation, type MandateInformation, type OriginalGroupInformation, type Party, type PaymentStatusInformation as PaymentStatus, PaymentStatusCode, PaymentStatusReport, RTPCreditPaymentInitiation, type RTPCreditPaymentInitiationConfig$1 as RTPCreditPaymentInitiationConfig, type RTPCreditPaymentInstruction, SEPACreditPaymentInitiation, type SEPACreditPaymentInitiationConfig$1 as SEPACreditPaymentInitiationConfig, type SEPACreditPaymentInstruction, SEPADirectDebitPaymentInitiation, type SEPADirectDebitPaymentInitiationConfig$1 as SEPADirectDebitPaymentInitiationConfig, type SEPADirectDebitPaymentInstruction, type SEPADirectDebitPaymentInstructionGroup, type SEPALocalInstrument, SEPAMultiCreditPaymentInitiation, type SEPAMultiCreditPaymentInitiationConfig$1 as SEPAMultiCreditPaymentInitiationConfig, type SEPAMultiCreditPaymentInstructionGroup, type SEPASequenceType, SWIFTCreditPaymentInitiation, type SWIFTCreditPaymentInitiationConfig$1 as SWIFTCreditPaymentInitiationConfig, type SWIFTCreditPaymentInstruction, type Statement, type PaymentStatus as Status, type StatusInformation, type StatusType, type StructuredAddress, type Transaction, type TransactionStatusInformation as TransactionStatus };