@aderis-erp/cli 1.0.8 → 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 +21 -9
- package/dist/commands/bank-accounts.js +18 -6
- package/dist/commands/bank-integrations.js +18 -6
- package/dist/commands/business-partners.d.ts +1 -0
- package/dist/commands/business-partners.js +33 -8
- 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.d.ts +1 -0
- package/dist/commands/payment-methods.js +26 -8
- 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/{payment-method-ledger-mappings.d.ts → saved-views.d.ts} +2 -3
- package/dist/commands/{payment-method-ledger-mappings.js → saved-views.js} +32 -20
- 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-declaration.d.ts → vat-declarations.d.ts} +1 -1
- package/dist/commands/{vat-declaration.js → vat-declarations.js} +43 -30
- 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 +177 -340
- package/package.json +1 -1
- package/dist/commands/business-partners---contacts.d.ts +0 -42
- package/dist/commands/business-partners---contacts.js +0 -1074
|
@@ -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);
|
|
@@ -1012,12 +1012,24 @@ export default class Integrations 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);
|
|
@@ -1017,12 +1017,24 @@ export default class ItemCategories 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);
|
package/dist/commands/items.js
CHANGED
|
@@ -1017,12 +1017,24 @@ export default class Items 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);
|
|
@@ -1009,12 +1009,24 @@ export default class JournalLines extends Command {
|
|
|
1009
1009
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1010
1010
|
}
|
|
1011
1011
|
getValue(row, col) {
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1012
|
+
if (!col.includes('.'))
|
|
1013
|
+
return String(row[col] ?? '');
|
|
1014
|
+
const parts = col.split('.');
|
|
1015
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1016
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1017
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1018
|
+
const walk = (o, idx) => {
|
|
1019
|
+
if (idx >= parts.length)
|
|
1020
|
+
return [o];
|
|
1021
|
+
if (o == null)
|
|
1022
|
+
return [];
|
|
1023
|
+
if (Array.isArray(o))
|
|
1024
|
+
return o.flatMap(item => walk(item, idx));
|
|
1025
|
+
if (typeof o === 'object')
|
|
1026
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1027
|
+
return [];
|
|
1028
|
+
};
|
|
1029
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1018
1030
|
}
|
|
1019
1031
|
printTable(data, fields) {
|
|
1020
1032
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1033,12 +1033,24 @@ export default class Journals extends Command {
|
|
|
1033
1033
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1034
1034
|
}
|
|
1035
1035
|
getValue(row, col) {
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1036
|
+
if (!col.includes('.'))
|
|
1037
|
+
return String(row[col] ?? '');
|
|
1038
|
+
const parts = col.split('.');
|
|
1039
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1040
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1041
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1042
|
+
const walk = (o, idx) => {
|
|
1043
|
+
if (idx >= parts.length)
|
|
1044
|
+
return [o];
|
|
1045
|
+
if (o == null)
|
|
1046
|
+
return [];
|
|
1047
|
+
if (Array.isArray(o))
|
|
1048
|
+
return o.flatMap(item => walk(item, idx));
|
|
1049
|
+
if (typeof o === 'object')
|
|
1050
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1051
|
+
return [];
|
|
1052
|
+
};
|
|
1053
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1042
1054
|
}
|
|
1043
1055
|
printTable(data, fields) {
|
|
1044
1056
|
const { cols, items } = this.getColumns(data, fields);
|
package/dist/commands/ledgers.js
CHANGED
|
@@ -1030,12 +1030,24 @@ export default class Ledgers extends Command {
|
|
|
1030
1030
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1031
1031
|
}
|
|
1032
1032
|
getValue(row, col) {
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1033
|
+
if (!col.includes('.'))
|
|
1034
|
+
return String(row[col] ?? '');
|
|
1035
|
+
const parts = col.split('.');
|
|
1036
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1037
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1038
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1039
|
+
const walk = (o, idx) => {
|
|
1040
|
+
if (idx >= parts.length)
|
|
1041
|
+
return [o];
|
|
1042
|
+
if (o == null)
|
|
1043
|
+
return [];
|
|
1044
|
+
if (Array.isArray(o))
|
|
1045
|
+
return o.flatMap(item => walk(item, idx));
|
|
1046
|
+
if (typeof o === 'object')
|
|
1047
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1048
|
+
return [];
|
|
1049
|
+
};
|
|
1050
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1039
1051
|
}
|
|
1040
1052
|
printTable(data, fields) {
|
|
1041
1053
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1017,12 +1017,24 @@ export default class OfficeLocations 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);
|
|
@@ -14,6 +14,7 @@ export default class PaymentMethods extends Command {
|
|
|
14
14
|
data: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
15
|
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
16
|
set: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
id: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
18
|
page: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
19
|
limit: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
20
|
include: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -5,14 +5,19 @@ import { getCurrentContext, getContext, getBaseUrls } from '../lib/config.js';
|
|
|
5
5
|
const HAS_IMPORT = true;
|
|
6
6
|
const HAS_EXPORT = true;
|
|
7
7
|
const HAS_CAMT053 = false;
|
|
8
|
-
const NESTED_IMPORTS = [];
|
|
9
|
-
const SUBCOMMANDS = [...["list", "create", "get", "update", "delete"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
8
|
+
const NESTED_IMPORTS = ["ledger-mappings"];
|
|
9
|
+
const SUBCOMMANDS = [...["list", "create", "get", "update", "delete", "list-ledger-mappings", "create-ledger-mappings", "get-ledger-mappings", "update-ledger-mappings", "delete-ledger-mappings"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
10
10
|
const ENDPOINTS = {
|
|
11
11
|
'list': { method: 'GET', path: '/v1/payment-methods', summary: 'Get all payment methods with pagination', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
12
|
'create': { method: 'POST', path: '/v1/payment-methods', summary: 'Create a new payment method', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['alternativeBankAccountIds', 'alternativeCreditCardAccountIds'] },
|
|
13
13
|
'get': { method: 'GET', path: '/v1/payment-methods/{id}', summary: 'Get a payment method by ID', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
14
14
|
'update': { method: 'PATCH', path: '/v1/payment-methods/{id}', summary: 'Update a payment method', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['alternativeBankAccountIds', 'alternativeCreditCardAccountIds'] },
|
|
15
15
|
'delete': { method: 'DELETE', path: '/v1/payment-methods/{id}', summary: 'Delete a payment method', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
16
|
+
'list-ledger-mappings': { method: 'GET', path: '/v1/payment-methods/{paymentMethodId}/ledger-mappings', summary: 'List ledger mappings for a payment method', pathParams: ['paymentMethodId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
17
|
+
'create-ledger-mappings': { method: 'POST', path: '/v1/payment-methods/{paymentMethodId}/ledger-mappings', summary: 'Create payment method ledger mapping', pathParams: ['paymentMethodId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
18
|
+
'get-ledger-mappings': { method: 'GET', path: '/v1/payment-methods/{paymentMethodId}/ledger-mappings/{id}', summary: 'Get payment method ledger mapping by ID', pathParams: ['paymentMethodId', 'id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
19
|
+
'update-ledger-mappings': { method: 'PATCH', path: '/v1/payment-methods/{paymentMethodId}/ledger-mappings/{id}', summary: 'Update payment method ledger mapping', pathParams: ['paymentMethodId', 'id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
20
|
+
'delete-ledger-mappings': { method: 'DELETE', path: '/v1/payment-methods/{paymentMethodId}/ledger-mappings/{id}', summary: 'Delete payment method ledger mapping', pathParams: ['paymentMethodId', 'id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
16
21
|
};
|
|
17
22
|
export default class PaymentMethods extends Command {
|
|
18
23
|
static description = 'Manage payment methods';
|
|
@@ -36,6 +41,7 @@ export default class PaymentMethods extends Command {
|
|
|
36
41
|
data: Flags.string({ char: 'd', description: 'JSON data for request body' }),
|
|
37
42
|
file: Flags.string({ char: 'f', description: 'Read request body from file' }),
|
|
38
43
|
set: Flags.string({ char: 's', description: 'Set individual field (e.g. --set firstName=John)', multiple: true }),
|
|
44
|
+
'id': Flags.string({ description: 'Path param: id' }),
|
|
39
45
|
page: Flags.string({ description: 'Page number' }),
|
|
40
46
|
limit: Flags.string({ description: 'Items per page' }),
|
|
41
47
|
include: Flags.string({ description: 'Relations to include' }),
|
|
@@ -1017,12 +1023,24 @@ export default class PaymentMethods extends Command {
|
|
|
1017
1023
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1018
1024
|
}
|
|
1019
1025
|
getValue(row, col) {
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
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(';');
|
|
1026
1044
|
}
|
|
1027
1045
|
printTable(data, fields) {
|
|
1028
1046
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1032,12 +1032,24 @@ export default class PaymentRuns 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);
|
|
@@ -1018,12 +1018,24 @@ export default class PaymentTerms 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);
|
|
@@ -1023,12 +1023,24 @@ export default class PriceLists 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);
|
|
@@ -1015,12 +1015,24 @@ export default class ProcessorMappings extends Command {
|
|
|
1015
1015
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1016
1016
|
}
|
|
1017
1017
|
getValue(row, col) {
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1018
|
+
if (!col.includes('.'))
|
|
1019
|
+
return String(row[col] ?? '');
|
|
1020
|
+
const parts = col.split('.');
|
|
1021
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1022
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1023
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1024
|
+
const walk = (o, idx) => {
|
|
1025
|
+
if (idx >= parts.length)
|
|
1026
|
+
return [o];
|
|
1027
|
+
if (o == null)
|
|
1028
|
+
return [];
|
|
1029
|
+
if (Array.isArray(o))
|
|
1030
|
+
return o.flatMap(item => walk(item, idx));
|
|
1031
|
+
if (typeof o === 'object')
|
|
1032
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1033
|
+
return [];
|
|
1034
|
+
};
|
|
1035
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1024
1036
|
}
|
|
1025
1037
|
printTable(data, fields) {
|
|
1026
1038
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1021,12 +1021,24 @@ export default class Processors extends Command {
|
|
|
1021
1021
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1022
1022
|
}
|
|
1023
1023
|
getValue(row, col) {
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1024
|
+
if (!col.includes('.'))
|
|
1025
|
+
return String(row[col] ?? '');
|
|
1026
|
+
const parts = col.split('.');
|
|
1027
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1028
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1029
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1030
|
+
const walk = (o, idx) => {
|
|
1031
|
+
if (idx >= parts.length)
|
|
1032
|
+
return [o];
|
|
1033
|
+
if (o == null)
|
|
1034
|
+
return [];
|
|
1035
|
+
if (Array.isArray(o))
|
|
1036
|
+
return o.flatMap(item => walk(item, idx));
|
|
1037
|
+
if (typeof o === 'object')
|
|
1038
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1039
|
+
return [];
|
|
1040
|
+
};
|
|
1041
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1030
1042
|
}
|
|
1031
1043
|
printTable(data, fields) {
|
|
1032
1044
|
const { cols, items } = this.getColumns(data, fields);
|
package/dist/commands/reports.js
CHANGED
|
@@ -1010,12 +1010,24 @@ export default class Reports 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);
|
|
@@ -1017,12 +1017,24 @@ export default class SalaryTypes 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);
|