@lucianpacurar/iso20022.js 0.2.16 → 0.2.17
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 +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/src/camt/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1528,7 +1528,7 @@ interface Statement {
|
|
|
1528
1528
|
/** Account details for which the statement is generated. */
|
|
1529
1529
|
account: Account;
|
|
1530
1530
|
/** Financial institution details. */
|
|
1531
|
-
agent
|
|
1531
|
+
agent?: Agent;
|
|
1532
1532
|
/** Total number of entries in the statement. */
|
|
1533
1533
|
numOfEntries?: number;
|
|
1534
1534
|
/** Sum of all entries in the statement. */
|
package/dist/index.js
CHANGED
|
@@ -9816,7 +9816,7 @@ const parseStatement = (stmt) => {
|
|
|
9816
9816
|
// Get account information
|
|
9817
9817
|
// TODO: Save account types here
|
|
9818
9818
|
const account = parseAccount(stmt.Acct);
|
|
9819
|
-
const agent = parseAgent(stmt.Acct.Svcr);
|
|
9819
|
+
const agent = stmt.Acct.Svcr ? parseAgent(stmt.Acct.Svcr) : undefined;
|
|
9820
9820
|
let balances = [];
|
|
9821
9821
|
if (Array.isArray(stmt.Bal)) {
|
|
9822
9822
|
balances = stmt.Bal.map(parseBalance);
|
|
@@ -9882,7 +9882,7 @@ const exportStatement = (stmt) => {
|
|
|
9882
9882
|
},
|
|
9883
9883
|
Acct: {
|
|
9884
9884
|
...exportAccount(stmt.account),
|
|
9885
|
-
Svcr: exportAgent(stmt.agent),
|
|
9885
|
+
Svcr: stmt.agent ? exportAgent(stmt.agent) : undefined,
|
|
9886
9886
|
},
|
|
9887
9887
|
Bal: stmt.balances.map(bal => exportBalance(bal)),
|
|
9888
9888
|
Ntry: stmt.entries.map(entry => exportEntry(entry)),
|
package/dist/index.mjs
CHANGED
|
@@ -9814,7 +9814,7 @@ const parseStatement = (stmt) => {
|
|
|
9814
9814
|
// Get account information
|
|
9815
9815
|
// TODO: Save account types here
|
|
9816
9816
|
const account = parseAccount(stmt.Acct);
|
|
9817
|
-
const agent = parseAgent(stmt.Acct.Svcr);
|
|
9817
|
+
const agent = stmt.Acct.Svcr ? parseAgent(stmt.Acct.Svcr) : undefined;
|
|
9818
9818
|
let balances = [];
|
|
9819
9819
|
if (Array.isArray(stmt.Bal)) {
|
|
9820
9820
|
balances = stmt.Bal.map(parseBalance);
|
|
@@ -9880,7 +9880,7 @@ const exportStatement = (stmt) => {
|
|
|
9880
9880
|
},
|
|
9881
9881
|
Acct: {
|
|
9882
9882
|
...exportAccount(stmt.account),
|
|
9883
|
-
Svcr: exportAgent(stmt.agent),
|
|
9883
|
+
Svcr: stmt.agent ? exportAgent(stmt.agent) : undefined,
|
|
9884
9884
|
},
|
|
9885
9885
|
Bal: stmt.balances.map(bal => exportBalance(bal)),
|
|
9886
9886
|
Ntry: stmt.entries.map(entry => exportEntry(entry)),
|
package/dist/src/camt/types.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface Statement {
|
|
|
19
19
|
/** Account details for which the statement is generated. */
|
|
20
20
|
account: Account;
|
|
21
21
|
/** Financial institution details. */
|
|
22
|
-
agent
|
|
22
|
+
agent?: Agent;
|
|
23
23
|
/** Total number of entries in the statement. */
|
|
24
24
|
numOfEntries?: number;
|
|
25
25
|
/** Sum of all entries in the statement. */
|