@aderis-erp/cli 1.0.9 → 1.0.10
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/commands/access-groups.js +18 -6
- package/dist/commands/account-transaction-allocations.js +18 -6
- package/dist/commands/account-transactions.js +18 -6
- package/dist/commands/accounts.js +18 -6
- package/dist/commands/agent-runs.js +18 -6
- package/dist/commands/audit-log.js +18 -6
- package/dist/commands/bank-accounts.js +18 -6
- package/dist/commands/bank-integrations.js +18 -6
- package/dist/commands/business-partners.js +18 -6
- package/dist/commands/credit-card-accounts.js +18 -6
- package/dist/commands/documents.js +18 -6
- package/dist/commands/dunning-configs.js +18 -6
- package/dist/commands/dunning-reminders.js +18 -6
- package/dist/commands/dunning-runs.js +18 -6
- package/dist/commands/employees.js +18 -6
- package/dist/commands/event-processor-mappings.js +18 -6
- package/dist/commands/files-internal.js +18 -6
- package/dist/commands/health.js +18 -6
- package/dist/commands/inbox.js +18 -6
- package/dist/commands/integrations.js +18 -6
- package/dist/commands/item-categories.js +18 -6
- package/dist/commands/items.js +18 -6
- package/dist/commands/journal-lines.js +18 -6
- package/dist/commands/journals.js +18 -6
- package/dist/commands/ledgers.js +18 -6
- package/dist/commands/office-locations.js +18 -6
- package/dist/commands/payment-methods.js +18 -6
- package/dist/commands/payment-runs.js +18 -6
- package/dist/commands/payment-terms.js +18 -6
- package/dist/commands/price-lists.js +18 -6
- package/dist/commands/processor-mappings.js +18 -6
- package/dist/commands/processors.js +18 -6
- package/dist/commands/reports.js +18 -6
- package/dist/commands/salary-types.js +18 -6
- package/dist/commands/sales-invoices.js +18 -6
- package/dist/commands/sales-orders.js +18 -6
- package/dist/commands/saved-views.js +18 -6
- package/dist/commands/tags.js +18 -6
- package/dist/commands/tax-codes.js +18 -6
- package/dist/commands/tax-matrix.js +18 -6
- package/dist/commands/tenants.js +18 -6
- package/dist/commands/text-templates.js +18 -6
- package/dist/commands/tools.js +18 -6
- package/dist/commands/vat-declarations.js +18 -6
- package/dist/commands/vendor-invoices.js +18 -6
- package/dist/commands/webhooks.js +18 -6
- package/dist/commands/workflows.js +18 -6
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
|
@@ -1017,12 +1017,24 @@ export default class AccessGroups extends Command {
|
|
|
1017
1017
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1018
1018
|
}
|
|
1019
1019
|
getValue(row, col) {
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1020
|
+
if (!col.includes('.'))
|
|
1021
|
+
return String(row[col] ?? '');
|
|
1022
|
+
const parts = col.split('.');
|
|
1023
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1024
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1025
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1026
|
+
const walk = (o, idx) => {
|
|
1027
|
+
if (idx >= parts.length)
|
|
1028
|
+
return [o];
|
|
1029
|
+
if (o == null)
|
|
1030
|
+
return [];
|
|
1031
|
+
if (Array.isArray(o))
|
|
1032
|
+
return o.flatMap(item => walk(item, idx));
|
|
1033
|
+
if (typeof o === 'object')
|
|
1034
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1035
|
+
return [];
|
|
1036
|
+
};
|
|
1037
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1026
1038
|
}
|
|
1027
1039
|
printTable(data, fields) {
|
|
1028
1040
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1011,12 +1011,24 @@ export default class AccountTransactionAllocations extends Command {
|
|
|
1011
1011
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1012
1012
|
}
|
|
1013
1013
|
getValue(row, col) {
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1014
|
+
if (!col.includes('.'))
|
|
1015
|
+
return String(row[col] ?? '');
|
|
1016
|
+
const parts = col.split('.');
|
|
1017
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1018
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1019
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1020
|
+
const walk = (o, idx) => {
|
|
1021
|
+
if (idx >= parts.length)
|
|
1022
|
+
return [o];
|
|
1023
|
+
if (o == null)
|
|
1024
|
+
return [];
|
|
1025
|
+
if (Array.isArray(o))
|
|
1026
|
+
return o.flatMap(item => walk(item, idx));
|
|
1027
|
+
if (typeof o === 'object')
|
|
1028
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1029
|
+
return [];
|
|
1030
|
+
};
|
|
1031
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1020
1032
|
}
|
|
1021
1033
|
printTable(data, fields) {
|
|
1022
1034
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1031,12 +1031,24 @@ export default class AccountTransactions extends Command {
|
|
|
1031
1031
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1032
1032
|
}
|
|
1033
1033
|
getValue(row, col) {
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1034
|
+
if (!col.includes('.'))
|
|
1035
|
+
return String(row[col] ?? '');
|
|
1036
|
+
const parts = col.split('.');
|
|
1037
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1038
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1039
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1040
|
+
const walk = (o, idx) => {
|
|
1041
|
+
if (idx >= parts.length)
|
|
1042
|
+
return [o];
|
|
1043
|
+
if (o == null)
|
|
1044
|
+
return [];
|
|
1045
|
+
if (Array.isArray(o))
|
|
1046
|
+
return o.flatMap(item => walk(item, idx));
|
|
1047
|
+
if (typeof o === 'object')
|
|
1048
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1049
|
+
return [];
|
|
1050
|
+
};
|
|
1051
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1040
1052
|
}
|
|
1041
1053
|
printTable(data, fields) {
|
|
1042
1054
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1023,12 +1023,24 @@ export default class Accounts extends Command {
|
|
|
1023
1023
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1024
1024
|
}
|
|
1025
1025
|
getValue(row, col) {
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1026
|
+
if (!col.includes('.'))
|
|
1027
|
+
return String(row[col] ?? '');
|
|
1028
|
+
const parts = col.split('.');
|
|
1029
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1030
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1031
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1032
|
+
const walk = (o, idx) => {
|
|
1033
|
+
if (idx >= parts.length)
|
|
1034
|
+
return [o];
|
|
1035
|
+
if (o == null)
|
|
1036
|
+
return [];
|
|
1037
|
+
if (Array.isArray(o))
|
|
1038
|
+
return o.flatMap(item => walk(item, idx));
|
|
1039
|
+
if (typeof o === 'object')
|
|
1040
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1041
|
+
return [];
|
|
1042
|
+
};
|
|
1043
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1032
1044
|
}
|
|
1033
1045
|
printTable(data, fields) {
|
|
1034
1046
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1014,12 +1014,24 @@ export default class AgentRuns extends Command {
|
|
|
1014
1014
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1015
1015
|
}
|
|
1016
1016
|
getValue(row, col) {
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1017
|
+
if (!col.includes('.'))
|
|
1018
|
+
return String(row[col] ?? '');
|
|
1019
|
+
const parts = col.split('.');
|
|
1020
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1021
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1022
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1023
|
+
const walk = (o, idx) => {
|
|
1024
|
+
if (idx >= parts.length)
|
|
1025
|
+
return [o];
|
|
1026
|
+
if (o == null)
|
|
1027
|
+
return [];
|
|
1028
|
+
if (Array.isArray(o))
|
|
1029
|
+
return o.flatMap(item => walk(item, idx));
|
|
1030
|
+
if (typeof o === 'object')
|
|
1031
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1032
|
+
return [];
|
|
1033
|
+
};
|
|
1034
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1023
1035
|
}
|
|
1024
1036
|
printTable(data, fields) {
|
|
1025
1037
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1011,12 +1011,24 @@ export default class AuditLog extends Command {
|
|
|
1011
1011
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1012
1012
|
}
|
|
1013
1013
|
getValue(row, col) {
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1014
|
+
if (!col.includes('.'))
|
|
1015
|
+
return String(row[col] ?? '');
|
|
1016
|
+
const parts = col.split('.');
|
|
1017
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1018
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1019
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1020
|
+
const walk = (o, idx) => {
|
|
1021
|
+
if (idx >= parts.length)
|
|
1022
|
+
return [o];
|
|
1023
|
+
if (o == null)
|
|
1024
|
+
return [];
|
|
1025
|
+
if (Array.isArray(o))
|
|
1026
|
+
return o.flatMap(item => walk(item, idx));
|
|
1027
|
+
if (typeof o === 'object')
|
|
1028
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1029
|
+
return [];
|
|
1030
|
+
};
|
|
1031
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1020
1032
|
}
|
|
1021
1033
|
printTable(data, fields) {
|
|
1022
1034
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1031,12 +1031,24 @@ export default class BankAccounts extends Command {
|
|
|
1031
1031
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1032
1032
|
}
|
|
1033
1033
|
getValue(row, col) {
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1034
|
+
if (!col.includes('.'))
|
|
1035
|
+
return String(row[col] ?? '');
|
|
1036
|
+
const parts = col.split('.');
|
|
1037
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1038
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1039
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1040
|
+
const walk = (o, idx) => {
|
|
1041
|
+
if (idx >= parts.length)
|
|
1042
|
+
return [o];
|
|
1043
|
+
if (o == null)
|
|
1044
|
+
return [];
|
|
1045
|
+
if (Array.isArray(o))
|
|
1046
|
+
return o.flatMap(item => walk(item, idx));
|
|
1047
|
+
if (typeof o === 'object')
|
|
1048
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1049
|
+
return [];
|
|
1050
|
+
};
|
|
1051
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1040
1052
|
}
|
|
1041
1053
|
printTable(data, fields) {
|
|
1042
1054
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1032,12 +1032,24 @@ export default class BankIntegrations extends Command {
|
|
|
1032
1032
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1033
1033
|
}
|
|
1034
1034
|
getValue(row, col) {
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1035
|
+
if (!col.includes('.'))
|
|
1036
|
+
return String(row[col] ?? '');
|
|
1037
|
+
const parts = col.split('.');
|
|
1038
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1039
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1040
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1041
|
+
const walk = (o, idx) => {
|
|
1042
|
+
if (idx >= parts.length)
|
|
1043
|
+
return [o];
|
|
1044
|
+
if (o == null)
|
|
1045
|
+
return [];
|
|
1046
|
+
if (Array.isArray(o))
|
|
1047
|
+
return o.flatMap(item => walk(item, idx));
|
|
1048
|
+
if (typeof o === 'object')
|
|
1049
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1050
|
+
return [];
|
|
1051
|
+
};
|
|
1052
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1041
1053
|
}
|
|
1042
1054
|
printTable(data, fields) {
|
|
1043
1055
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1036,12 +1036,24 @@ export default class BusinessPartners extends Command {
|
|
|
1036
1036
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1037
1037
|
}
|
|
1038
1038
|
getValue(row, col) {
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1039
|
+
if (!col.includes('.'))
|
|
1040
|
+
return String(row[col] ?? '');
|
|
1041
|
+
const parts = col.split('.');
|
|
1042
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1043
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1044
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1045
|
+
const walk = (o, idx) => {
|
|
1046
|
+
if (idx >= parts.length)
|
|
1047
|
+
return [o];
|
|
1048
|
+
if (o == null)
|
|
1049
|
+
return [];
|
|
1050
|
+
if (Array.isArray(o))
|
|
1051
|
+
return o.flatMap(item => walk(item, idx));
|
|
1052
|
+
if (typeof o === 'object')
|
|
1053
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1054
|
+
return [];
|
|
1055
|
+
};
|
|
1056
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1045
1057
|
}
|
|
1046
1058
|
printTable(data, fields) {
|
|
1047
1059
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1029,12 +1029,24 @@ export default class CreditCardAccounts extends Command {
|
|
|
1029
1029
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1030
1030
|
}
|
|
1031
1031
|
getValue(row, col) {
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1032
|
+
if (!col.includes('.'))
|
|
1033
|
+
return String(row[col] ?? '');
|
|
1034
|
+
const parts = col.split('.');
|
|
1035
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1036
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1037
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1038
|
+
const walk = (o, idx) => {
|
|
1039
|
+
if (idx >= parts.length)
|
|
1040
|
+
return [o];
|
|
1041
|
+
if (o == null)
|
|
1042
|
+
return [];
|
|
1043
|
+
if (Array.isArray(o))
|
|
1044
|
+
return o.flatMap(item => walk(item, idx));
|
|
1045
|
+
if (typeof o === 'object')
|
|
1046
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1047
|
+
return [];
|
|
1048
|
+
};
|
|
1049
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1038
1050
|
}
|
|
1039
1051
|
printTable(data, fields) {
|
|
1040
1052
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1018,12 +1018,24 @@ export default class Documents extends Command {
|
|
|
1018
1018
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1019
1019
|
}
|
|
1020
1020
|
getValue(row, col) {
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1021
|
+
if (!col.includes('.'))
|
|
1022
|
+
return String(row[col] ?? '');
|
|
1023
|
+
const parts = col.split('.');
|
|
1024
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1025
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1026
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1027
|
+
const walk = (o, idx) => {
|
|
1028
|
+
if (idx >= parts.length)
|
|
1029
|
+
return [o];
|
|
1030
|
+
if (o == null)
|
|
1031
|
+
return [];
|
|
1032
|
+
if (Array.isArray(o))
|
|
1033
|
+
return o.flatMap(item => walk(item, idx));
|
|
1034
|
+
if (typeof o === 'object')
|
|
1035
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1036
|
+
return [];
|
|
1037
|
+
};
|
|
1038
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1027
1039
|
}
|
|
1028
1040
|
printTable(data, fields) {
|
|
1029
1041
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1017,12 +1017,24 @@ export default class DunningConfigs extends Command {
|
|
|
1017
1017
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1018
1018
|
}
|
|
1019
1019
|
getValue(row, col) {
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1020
|
+
if (!col.includes('.'))
|
|
1021
|
+
return String(row[col] ?? '');
|
|
1022
|
+
const parts = col.split('.');
|
|
1023
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1024
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1025
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1026
|
+
const walk = (o, idx) => {
|
|
1027
|
+
if (idx >= parts.length)
|
|
1028
|
+
return [o];
|
|
1029
|
+
if (o == null)
|
|
1030
|
+
return [];
|
|
1031
|
+
if (Array.isArray(o))
|
|
1032
|
+
return o.flatMap(item => walk(item, idx));
|
|
1033
|
+
if (typeof o === 'object')
|
|
1034
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1035
|
+
return [];
|
|
1036
|
+
};
|
|
1037
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1026
1038
|
}
|
|
1027
1039
|
printTable(data, fields) {
|
|
1028
1040
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1018,12 +1018,24 @@ export default class DunningReminders extends Command {
|
|
|
1018
1018
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1019
1019
|
}
|
|
1020
1020
|
getValue(row, col) {
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1021
|
+
if (!col.includes('.'))
|
|
1022
|
+
return String(row[col] ?? '');
|
|
1023
|
+
const parts = col.split('.');
|
|
1024
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1025
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1026
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1027
|
+
const walk = (o, idx) => {
|
|
1028
|
+
if (idx >= parts.length)
|
|
1029
|
+
return [o];
|
|
1030
|
+
if (o == null)
|
|
1031
|
+
return [];
|
|
1032
|
+
if (Array.isArray(o))
|
|
1033
|
+
return o.flatMap(item => walk(item, idx));
|
|
1034
|
+
if (typeof o === 'object')
|
|
1035
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1036
|
+
return [];
|
|
1037
|
+
};
|
|
1038
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1027
1039
|
}
|
|
1028
1040
|
printTable(data, fields) {
|
|
1029
1041
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1006,12 +1006,24 @@ export default class DunningRuns extends Command {
|
|
|
1006
1006
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1007
1007
|
}
|
|
1008
1008
|
getValue(row, col) {
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1009
|
+
if (!col.includes('.'))
|
|
1010
|
+
return String(row[col] ?? '');
|
|
1011
|
+
const parts = col.split('.');
|
|
1012
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1013
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1014
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1015
|
+
const walk = (o, idx) => {
|
|
1016
|
+
if (idx >= parts.length)
|
|
1017
|
+
return [o];
|
|
1018
|
+
if (o == null)
|
|
1019
|
+
return [];
|
|
1020
|
+
if (Array.isArray(o))
|
|
1021
|
+
return o.flatMap(item => walk(item, idx));
|
|
1022
|
+
if (typeof o === 'object')
|
|
1023
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1024
|
+
return [];
|
|
1025
|
+
};
|
|
1026
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1015
1027
|
}
|
|
1016
1028
|
printTable(data, fields) {
|
|
1017
1029
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1048,12 +1048,24 @@ export default class Employees extends Command {
|
|
|
1048
1048
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1049
1049
|
}
|
|
1050
1050
|
getValue(row, col) {
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1051
|
+
if (!col.includes('.'))
|
|
1052
|
+
return String(row[col] ?? '');
|
|
1053
|
+
const parts = col.split('.');
|
|
1054
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1055
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1056
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1057
|
+
const walk = (o, idx) => {
|
|
1058
|
+
if (idx >= parts.length)
|
|
1059
|
+
return [o];
|
|
1060
|
+
if (o == null)
|
|
1061
|
+
return [];
|
|
1062
|
+
if (Array.isArray(o))
|
|
1063
|
+
return o.flatMap(item => walk(item, idx));
|
|
1064
|
+
if (typeof o === 'object')
|
|
1065
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1066
|
+
return [];
|
|
1067
|
+
};
|
|
1068
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1057
1069
|
}
|
|
1058
1070
|
printTable(data, fields) {
|
|
1059
1071
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1016,12 +1016,24 @@ export default class EventProcessorMappings extends Command {
|
|
|
1016
1016
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1017
1017
|
}
|
|
1018
1018
|
getValue(row, col) {
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1019
|
+
if (!col.includes('.'))
|
|
1020
|
+
return String(row[col] ?? '');
|
|
1021
|
+
const parts = col.split('.');
|
|
1022
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1023
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1024
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1025
|
+
const walk = (o, idx) => {
|
|
1026
|
+
if (idx >= parts.length)
|
|
1027
|
+
return [o];
|
|
1028
|
+
if (o == null)
|
|
1029
|
+
return [];
|
|
1030
|
+
if (Array.isArray(o))
|
|
1031
|
+
return o.flatMap(item => walk(item, idx));
|
|
1032
|
+
if (typeof o === 'object')
|
|
1033
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1034
|
+
return [];
|
|
1035
|
+
};
|
|
1036
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1025
1037
|
}
|
|
1026
1038
|
printTable(data, fields) {
|
|
1027
1039
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1018,12 +1018,24 @@ export default class FilesInternal extends Command {
|
|
|
1018
1018
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1019
1019
|
}
|
|
1020
1020
|
getValue(row, col) {
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1021
|
+
if (!col.includes('.'))
|
|
1022
|
+
return String(row[col] ?? '');
|
|
1023
|
+
const parts = col.split('.');
|
|
1024
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1025
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1026
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1027
|
+
const walk = (o, idx) => {
|
|
1028
|
+
if (idx >= parts.length)
|
|
1029
|
+
return [o];
|
|
1030
|
+
if (o == null)
|
|
1031
|
+
return [];
|
|
1032
|
+
if (Array.isArray(o))
|
|
1033
|
+
return o.flatMap(item => walk(item, idx));
|
|
1034
|
+
if (typeof o === 'object')
|
|
1035
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1036
|
+
return [];
|
|
1037
|
+
};
|
|
1038
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1027
1039
|
}
|
|
1028
1040
|
printTable(data, fields) {
|
|
1029
1041
|
const { cols, items } = this.getColumns(data, fields);
|
package/dist/commands/health.js
CHANGED
|
@@ -1012,12 +1012,24 @@ export default class Health extends Command {
|
|
|
1012
1012
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1013
1013
|
}
|
|
1014
1014
|
getValue(row, col) {
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1015
|
+
if (!col.includes('.'))
|
|
1016
|
+
return String(row[col] ?? '');
|
|
1017
|
+
const parts = col.split('.');
|
|
1018
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1019
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1020
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1021
|
+
const walk = (o, idx) => {
|
|
1022
|
+
if (idx >= parts.length)
|
|
1023
|
+
return [o];
|
|
1024
|
+
if (o == null)
|
|
1025
|
+
return [];
|
|
1026
|
+
if (Array.isArray(o))
|
|
1027
|
+
return o.flatMap(item => walk(item, idx));
|
|
1028
|
+
if (typeof o === 'object')
|
|
1029
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1030
|
+
return [];
|
|
1031
|
+
};
|
|
1032
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1021
1033
|
}
|
|
1022
1034
|
printTable(data, fields) {
|
|
1023
1035
|
const { cols, items } = this.getColumns(data, fields);
|
package/dist/commands/inbox.js
CHANGED
|
@@ -1010,12 +1010,24 @@ export default class Inbox extends Command {
|
|
|
1010
1010
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1011
1011
|
}
|
|
1012
1012
|
getValue(row, col) {
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1013
|
+
if (!col.includes('.'))
|
|
1014
|
+
return String(row[col] ?? '');
|
|
1015
|
+
const parts = col.split('.');
|
|
1016
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1017
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1018
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1019
|
+
const walk = (o, idx) => {
|
|
1020
|
+
if (idx >= parts.length)
|
|
1021
|
+
return [o];
|
|
1022
|
+
if (o == null)
|
|
1023
|
+
return [];
|
|
1024
|
+
if (Array.isArray(o))
|
|
1025
|
+
return o.flatMap(item => walk(item, idx));
|
|
1026
|
+
if (typeof o === 'object')
|
|
1027
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1028
|
+
return [];
|
|
1029
|
+
};
|
|
1030
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1019
1031
|
}
|
|
1020
1032
|
printTable(data, fields) {
|
|
1021
1033
|
const { cols, items } = this.getColumns(data, fields);
|