@lucianpacurar/iso20022.js 0.2.15 → 0.2.16

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
@@ -1425,6 +1425,34 @@ declare class SEPADirectDebitPaymentInitiation extends PaymentInitiation {
1425
1425
  RmtInf?: {
1426
1426
  Ustrd: string;
1427
1427
  } | undefined;
1428
+ Dbtr: any;
1429
+ DbtrAcct: {
1430
+ Id: {
1431
+ IBAN: string;
1432
+ };
1433
+ } | {
1434
+ Id: {
1435
+ Othr: {
1436
+ Id: string;
1437
+ };
1438
+ };
1439
+ };
1440
+ DbtrAgt?: {
1441
+ FinInstnId: {
1442
+ BIC: string;
1443
+ ClrSysMmbId?: undefined;
1444
+ };
1445
+ } | {
1446
+ FinInstnId: {
1447
+ ClrSysMmbId: {
1448
+ ClrSysId: {
1449
+ Cd: string;
1450
+ };
1451
+ MmbId: string;
1452
+ };
1453
+ BIC?: undefined;
1454
+ };
1455
+ } | undefined;
1428
1456
  PmtId: {
1429
1457
  EndToEndId: string;
1430
1458
  };
@@ -1455,34 +1483,6 @@ declare class SEPADirectDebitPaymentInitiation extends PaymentInitiation {
1455
1483
  AmdmntInd: boolean;
1456
1484
  };
1457
1485
  };
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
1486
  };
1487
1487
  /**
1488
1488
  * Serializes the SEPA direct debit initiation to an XML string.
package/dist/index.js CHANGED
@@ -8178,7 +8178,9 @@ class SEPACreditPaymentInitiation extends PaymentInitiation {
8178
8178
  ReqdExctnDt: this.creationDate.toISOString().split('T').at(0),
8179
8179
  Dbtr: this.party(this.initiatingParty),
8180
8180
  DbtrAcct: this.account(this.initiatingParty.account),
8181
- DbtrAgt: this.agent(this.initiatingParty.agent),
8181
+ ...(this.initiatingParty.agent && {
8182
+ DbtrAgt: this.agent(this.initiatingParty.agent),
8183
+ }),
8182
8184
  ChrgBr: 'SLEV',
8183
8185
  // payments[]
8184
8186
  CdtTrfTxInf: this.paymentInstructions.map(p => this.creditTransfer(p)),
@@ -9373,7 +9375,9 @@ class SEPADirectDebitPaymentInitiation extends PaymentInitiation {
9373
9375
  }),
9374
9376
  },
9375
9377
  },
9376
- DbtrAgt: this.agent(instruction.debtor.agent),
9378
+ ...(instruction.debtor.agent && {
9379
+ DbtrAgt: this.agent(instruction.debtor.agent),
9380
+ }),
9377
9381
  Dbtr: this.party(instruction.debtor),
9378
9382
  DbtrAcct: this.account(instruction.debtor.account),
9379
9383
  ...(instruction.remittanceInformation && {
@@ -9422,7 +9426,9 @@ class SEPADirectDebitPaymentInitiation extends PaymentInitiation {
9422
9426
  .split('T')[0],
9423
9427
  Cdtr: this.party(group.creditor),
9424
9428
  CdtrAcct: this.account(group.creditor.account),
9425
- CdtrAgt: this.agent(group.creditor.agent),
9429
+ ...(group.creditor.agent && {
9430
+ CdtrAgt: this.agent(group.creditor.agent),
9431
+ }),
9426
9432
  ChrgBr: 'SLEV',
9427
9433
  CdtrSchmeId: {
9428
9434
  Id: {
package/dist/index.mjs CHANGED
@@ -8176,7 +8176,9 @@ class SEPACreditPaymentInitiation extends PaymentInitiation {
8176
8176
  ReqdExctnDt: this.creationDate.toISOString().split('T').at(0),
8177
8177
  Dbtr: this.party(this.initiatingParty),
8178
8178
  DbtrAcct: this.account(this.initiatingParty.account),
8179
- DbtrAgt: this.agent(this.initiatingParty.agent),
8179
+ ...(this.initiatingParty.agent && {
8180
+ DbtrAgt: this.agent(this.initiatingParty.agent),
8181
+ }),
8180
8182
  ChrgBr: 'SLEV',
8181
8183
  // payments[]
8182
8184
  CdtTrfTxInf: this.paymentInstructions.map(p => this.creditTransfer(p)),
@@ -9371,7 +9373,9 @@ class SEPADirectDebitPaymentInitiation extends PaymentInitiation {
9371
9373
  }),
9372
9374
  },
9373
9375
  },
9374
- DbtrAgt: this.agent(instruction.debtor.agent),
9376
+ ...(instruction.debtor.agent && {
9377
+ DbtrAgt: this.agent(instruction.debtor.agent),
9378
+ }),
9375
9379
  Dbtr: this.party(instruction.debtor),
9376
9380
  DbtrAcct: this.account(instruction.debtor.account),
9377
9381
  ...(instruction.remittanceInformation && {
@@ -9420,7 +9424,9 @@ class SEPADirectDebitPaymentInitiation extends PaymentInitiation {
9420
9424
  .split('T')[0],
9421
9425
  Cdtr: this.party(group.creditor),
9422
9426
  CdtrAcct: this.account(group.creditor.account),
9423
- CdtrAgt: this.agent(group.creditor.agent),
9427
+ ...(group.creditor.agent && {
9428
+ CdtrAgt: this.agent(group.creditor.agent),
9429
+ }),
9424
9430
  ChrgBr: 'SLEV',
9425
9431
  CdtrSchmeId: {
9426
9432
  Id: {
@@ -120,6 +120,34 @@ export declare class SEPADirectDebitPaymentInitiation extends PaymentInitiation
120
120
  RmtInf?: {
121
121
  Ustrd: string;
122
122
  } | undefined;
123
+ Dbtr: any;
124
+ DbtrAcct: {
125
+ Id: {
126
+ IBAN: string;
127
+ };
128
+ } | {
129
+ Id: {
130
+ Othr: {
131
+ Id: string;
132
+ };
133
+ };
134
+ };
135
+ DbtrAgt?: {
136
+ FinInstnId: {
137
+ BIC: string;
138
+ ClrSysMmbId?: undefined;
139
+ };
140
+ } | {
141
+ FinInstnId: {
142
+ ClrSysMmbId: {
143
+ ClrSysId: {
144
+ Cd: string;
145
+ };
146
+ MmbId: string;
147
+ };
148
+ BIC?: undefined;
149
+ };
150
+ } | undefined;
123
151
  PmtId: {
124
152
  EndToEndId: string;
125
153
  };
@@ -150,34 +178,6 @@ export declare class SEPADirectDebitPaymentInitiation extends PaymentInitiation
150
178
  AmdmntInd: boolean;
151
179
  };
152
180
  };
153
- DbtrAgt: {
154
- FinInstnId: {
155
- BIC: string;
156
- ClrSysMmbId?: undefined;
157
- };
158
- } | {
159
- FinInstnId: {
160
- ClrSysMmbId: {
161
- ClrSysId: {
162
- Cd: string;
163
- };
164
- MmbId: string;
165
- };
166
- BIC?: undefined;
167
- };
168
- };
169
- Dbtr: any;
170
- DbtrAcct: {
171
- Id: {
172
- IBAN: string;
173
- };
174
- } | {
175
- Id: {
176
- Othr: {
177
- Id: string;
178
- };
179
- };
180
- };
181
181
  };
182
182
  /**
183
183
  * Serializes the SEPA direct debit initiation to an XML string.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucianpacurar/iso20022.js",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "readme": "README.md",
5
5
  "description": "Library to create payment messages.",
6
6
  "main": "dist/index.js",