@aderis-erp/cli 1.0.12 → 1.0.14
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 +4 -4
- package/dist/commands/account-transaction-allocations.js +4 -4
- package/dist/commands/account-transactions.js +4 -4
- package/dist/commands/accounts.js +4 -4
- package/dist/commands/{agent-runs.d.ts → agent-platform.d.ts} +2 -2
- package/dist/commands/agent-platform.js +1175 -0
- package/dist/commands/audit-log.js +7 -7
- package/dist/commands/auth/login.js +2 -3
- package/dist/commands/bank-accounts.js +4 -4
- package/dist/commands/bank-integrations.js +4 -4
- package/dist/commands/business-partners.js +6 -6
- package/dist/commands/chat.js +12 -8
- package/dist/commands/config/add.js +2 -3
- package/dist/commands/config/rename.d.ts +10 -0
- package/dist/commands/config/rename.js +68 -0
- package/dist/commands/credit-card-accounts.js +4 -4
- package/dist/commands/delivery-notes.d.ts +43 -0
- package/dist/commands/delivery-notes.js +1206 -0
- package/dist/commands/documents.js +5 -5
- package/dist/commands/dunning-configs.js +4 -4
- package/dist/commands/dunning-reminders.js +4 -4
- package/dist/commands/dunning-runs.js +4 -4
- package/dist/commands/email-transactions.js +4 -4
- package/dist/commands/employees.js +4 -4
- package/dist/commands/entity-configurations.js +4 -4
- package/dist/commands/event-processor-mappings.js +4 -4
- package/dist/commands/files-internal.js +4 -4
- package/dist/commands/health.js +4 -4
- package/dist/commands/inbox.d.ts +1 -0
- package/dist/commands/inbox.js +10 -8
- package/dist/commands/integrations.js +4 -4
- package/dist/commands/item-categories.js +4 -4
- package/dist/commands/items.js +4 -4
- package/dist/commands/journal-lines.js +4 -4
- package/dist/commands/journals.js +7 -5
- package/dist/commands/ledgers.js +4 -4
- package/dist/commands/office-locations.js +4 -4
- package/dist/commands/payment-methods.js +4 -4
- package/dist/commands/payment-runs.js +5 -7
- package/dist/commands/payment-terms.js +4 -4
- package/dist/commands/payments.d.ts +40 -0
- package/dist/commands/payments.js +1180 -0
- package/dist/commands/price-lists.js +4 -4
- package/dist/commands/processor-mappings.js +4 -4
- package/dist/commands/processors.js +4 -4
- package/dist/commands/purchase-order-types.js +4 -4
- package/dist/commands/purchase-orders.js +4 -4
- package/dist/commands/reports.js +4 -4
- package/dist/commands/salary-types.js +4 -4
- package/dist/commands/sales-invoices.js +13 -12
- package/dist/commands/sales-orders.js +7 -5
- package/dist/commands/saved-views.js +4 -4
- package/dist/commands/scheduled-processor-mappings.d.ts +40 -0
- package/dist/commands/{agent-runs.js → scheduled-processor-mappings.js} +22 -23
- package/dist/commands/schedules.d.ts +40 -0
- package/dist/commands/schedules.js +1182 -0
- package/dist/commands/tags.js +4 -4
- package/dist/commands/tax-codes.js +4 -4
- package/dist/commands/tax-matrix.js +4 -4
- package/dist/commands/tenants.js +9 -7
- package/dist/commands/text-templates.js +4 -4
- package/dist/commands/tools.js +4 -4
- package/dist/commands/vat-declarations.js +4 -4
- package/dist/commands/vendor-invoices.js +8 -8
- package/dist/commands/webhooks.js +4 -4
- package/dist/commands/workflows.js +4 -4
- package/dist/lib/api-client.d.ts +8 -0
- package/dist/lib/api-client.js +20 -0
- package/dist/lib/auth.js +2 -2
- package/dist/lib/config.d.ts +2 -1
- package/dist/lib/config.js +20 -5
- package/oclif.manifest.json +956 -231
- package/package.json +2 -2
package/dist/commands/ledgers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command, Args, Flags } from '@oclif/core';
|
|
2
|
-
import { apiRequest, ApiError } from '../lib/api-client.js';
|
|
2
|
+
import { apiRequest, ApiError, normalizeSortBy } from '../lib/api-client.js';
|
|
3
3
|
import { getCurrentContext, getContext, getBaseUrls } from '../lib/config.js';
|
|
4
4
|
// Add 'import' action if both create and update exist
|
|
5
5
|
const HAS_IMPORT = true;
|
|
@@ -53,7 +53,7 @@ export default class Ledgers extends Command {
|
|
|
53
53
|
limit: Flags.string({ description: 'Items per page' }),
|
|
54
54
|
include: Flags.string({ description: 'Relations to include' }),
|
|
55
55
|
search: Flags.string({ description: 'Search term' }),
|
|
56
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
56
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
57
57
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
58
58
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
59
59
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -127,7 +127,7 @@ export default class Ledgers extends Command {
|
|
|
127
127
|
if (flags.search)
|
|
128
128
|
queryParams.search = flags.search;
|
|
129
129
|
if (flags['sort-by'])
|
|
130
|
-
queryParams.sortBy = flags['sort-by'];
|
|
130
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
131
131
|
if (flags.query) {
|
|
132
132
|
try {
|
|
133
133
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -586,7 +586,7 @@ export default class Ledgers extends Command {
|
|
|
586
586
|
if (flags.search)
|
|
587
587
|
baseParams.search = flags.search;
|
|
588
588
|
if (flags['sort-by'])
|
|
589
|
-
baseParams.sortBy = flags['sort-by'];
|
|
589
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
590
590
|
if (flags.include)
|
|
591
591
|
baseParams.include = flags.include;
|
|
592
592
|
if (flags.query) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command, Args, Flags } from '@oclif/core';
|
|
2
|
-
import { apiRequest, ApiError } from '../lib/api-client.js';
|
|
2
|
+
import { apiRequest, ApiError, normalizeSortBy } from '../lib/api-client.js';
|
|
3
3
|
import { getCurrentContext, getContext, getBaseUrls } from '../lib/config.js';
|
|
4
4
|
// Add 'import' action if both create and update exist
|
|
5
5
|
const HAS_IMPORT = true;
|
|
@@ -40,7 +40,7 @@ export default class OfficeLocations extends Command {
|
|
|
40
40
|
limit: Flags.string({ description: 'Items per page' }),
|
|
41
41
|
include: Flags.string({ description: 'Relations to include' }),
|
|
42
42
|
search: Flags.string({ description: 'Search term' }),
|
|
43
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
43
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
44
44
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
45
45
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
46
46
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -114,7 +114,7 @@ export default class OfficeLocations extends Command {
|
|
|
114
114
|
if (flags.search)
|
|
115
115
|
queryParams.search = flags.search;
|
|
116
116
|
if (flags['sort-by'])
|
|
117
|
-
queryParams.sortBy = flags['sort-by'];
|
|
117
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
118
118
|
if (flags.query) {
|
|
119
119
|
try {
|
|
120
120
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -573,7 +573,7 @@ export default class OfficeLocations extends Command {
|
|
|
573
573
|
if (flags.search)
|
|
574
574
|
baseParams.search = flags.search;
|
|
575
575
|
if (flags['sort-by'])
|
|
576
|
-
baseParams.sortBy = flags['sort-by'];
|
|
576
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
577
577
|
if (flags.include)
|
|
578
578
|
baseParams.include = flags.include;
|
|
579
579
|
if (flags.query) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command, Args, Flags } from '@oclif/core';
|
|
2
|
-
import { apiRequest, ApiError } from '../lib/api-client.js';
|
|
2
|
+
import { apiRequest, ApiError, normalizeSortBy } from '../lib/api-client.js';
|
|
3
3
|
import { getCurrentContext, getContext, getBaseUrls } from '../lib/config.js';
|
|
4
4
|
// Add 'import' action if both create and update exist
|
|
5
5
|
const HAS_IMPORT = true;
|
|
@@ -46,7 +46,7 @@ export default class PaymentMethods extends Command {
|
|
|
46
46
|
limit: Flags.string({ description: 'Items per page' }),
|
|
47
47
|
include: Flags.string({ description: 'Relations to include' }),
|
|
48
48
|
search: Flags.string({ description: 'Search term' }),
|
|
49
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
49
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
50
50
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
51
51
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
52
52
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -120,7 +120,7 @@ export default class PaymentMethods extends Command {
|
|
|
120
120
|
if (flags.search)
|
|
121
121
|
queryParams.search = flags.search;
|
|
122
122
|
if (flags['sort-by'])
|
|
123
|
-
queryParams.sortBy = flags['sort-by'];
|
|
123
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
124
124
|
if (flags.query) {
|
|
125
125
|
try {
|
|
126
126
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -579,7 +579,7 @@ export default class PaymentMethods extends Command {
|
|
|
579
579
|
if (flags.search)
|
|
580
580
|
baseParams.search = flags.search;
|
|
581
581
|
if (flags['sort-by'])
|
|
582
|
-
baseParams.sortBy = flags['sort-by'];
|
|
582
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
583
583
|
if (flags.include)
|
|
584
584
|
baseParams.include = flags.include;
|
|
585
585
|
if (flags.query) {
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { Command, Args, Flags } from '@oclif/core';
|
|
2
|
-
import { apiRequest, ApiError } from '../lib/api-client.js';
|
|
2
|
+
import { apiRequest, ApiError, normalizeSortBy } from '../lib/api-client.js';
|
|
3
3
|
import { getCurrentContext, getContext, getBaseUrls } from '../lib/config.js';
|
|
4
4
|
// Add 'import' action if both create and update exist
|
|
5
5
|
const HAS_IMPORT = true;
|
|
6
6
|
const HAS_EXPORT = true;
|
|
7
7
|
const HAS_CAMT053 = false;
|
|
8
8
|
const NESTED_IMPORTS = [];
|
|
9
|
-
const SUBCOMMANDS = [...["
|
|
9
|
+
const SUBCOMMANDS = [...["open-submissions", "list", "create", "preview", "schedule", "status", "get", "update", "delete", "create-payments", "delete-payments", "send", "painfile", "sync-status", "sync-status-xml", "sync-all"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
10
10
|
const ENDPOINTS = {
|
|
11
|
-
'eligible-invoices': { method: 'GET', path: '/v1/payment-runs/eligible-invoices', summary: 'Get vendor invoices eligible for payment', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
|
-
'eligible-payments': { method: 'GET', path: '/v1/payment-runs/eligible-payments', summary: 'Get payments eligible for a payment run', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
13
11
|
'open-submissions': { method: 'GET', path: '/v1/payment-runs/bank-accounts/{bankAccountId}/open-submissions', summary: 'Get open submission IDs for a bank account', pathParams: ['bankAccountId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
14
12
|
'list': { method: 'GET', path: '/v1/payment-runs', summary: 'List all payment runs with pagination', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
15
13
|
'create': { method: 'POST', path: '/v1/payment-runs', summary: 'Create a DRAFT payment run from payment IDs', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['paymentIds'] },
|
|
@@ -55,7 +53,7 @@ export default class PaymentRuns extends Command {
|
|
|
55
53
|
limit: Flags.string({ description: 'Items per page' }),
|
|
56
54
|
include: Flags.string({ description: 'Relations to include' }),
|
|
57
55
|
search: Flags.string({ description: 'Search term' }),
|
|
58
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
56
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
59
57
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
60
58
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
61
59
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -129,7 +127,7 @@ export default class PaymentRuns extends Command {
|
|
|
129
127
|
if (flags.search)
|
|
130
128
|
queryParams.search = flags.search;
|
|
131
129
|
if (flags['sort-by'])
|
|
132
|
-
queryParams.sortBy = flags['sort-by'];
|
|
130
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
133
131
|
if (flags.query) {
|
|
134
132
|
try {
|
|
135
133
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -588,7 +586,7 @@ export default class PaymentRuns extends Command {
|
|
|
588
586
|
if (flags.search)
|
|
589
587
|
baseParams.search = flags.search;
|
|
590
588
|
if (flags['sort-by'])
|
|
591
|
-
baseParams.sortBy = flags['sort-by'];
|
|
589
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
592
590
|
if (flags.include)
|
|
593
591
|
baseParams.include = flags.include;
|
|
594
592
|
if (flags.query) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command, Args, Flags } from '@oclif/core';
|
|
2
|
-
import { apiRequest, ApiError } from '../lib/api-client.js';
|
|
2
|
+
import { apiRequest, ApiError, normalizeSortBy } from '../lib/api-client.js';
|
|
3
3
|
import { getCurrentContext, getContext, getBaseUrls } from '../lib/config.js';
|
|
4
4
|
// Add 'import' action if both create and update exist
|
|
5
5
|
const HAS_IMPORT = true;
|
|
@@ -41,7 +41,7 @@ export default class PaymentTerms extends Command {
|
|
|
41
41
|
limit: Flags.string({ description: 'Items per page' }),
|
|
42
42
|
include: Flags.string({ description: 'Relations to include' }),
|
|
43
43
|
search: Flags.string({ description: 'Search term' }),
|
|
44
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
44
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
45
45
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
46
46
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
47
47
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -115,7 +115,7 @@ export default class PaymentTerms extends Command {
|
|
|
115
115
|
if (flags.search)
|
|
116
116
|
queryParams.search = flags.search;
|
|
117
117
|
if (flags['sort-by'])
|
|
118
|
-
queryParams.sortBy = flags['sort-by'];
|
|
118
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
119
119
|
if (flags.query) {
|
|
120
120
|
try {
|
|
121
121
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -574,7 +574,7 @@ export default class PaymentTerms extends Command {
|
|
|
574
574
|
if (flags.search)
|
|
575
575
|
baseParams.search = flags.search;
|
|
576
576
|
if (flags['sort-by'])
|
|
577
|
-
baseParams.sortBy = flags['sort-by'];
|
|
577
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
578
578
|
if (flags.include)
|
|
579
579
|
baseParams.include = flags.include;
|
|
580
580
|
if (flags.query) {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class Payments extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
action: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
id: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: {
|
|
10
|
+
context: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
table: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
csv: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
data: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
set: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
page: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
limit: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
include: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
search: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
'sort-by': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
filter: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
query: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
|
+
fields: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
25
|
+
sanitize: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
26
|
+
'show-http-request': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
27
|
+
};
|
|
28
|
+
run(): Promise<void>;
|
|
29
|
+
private runImport;
|
|
30
|
+
private runExport;
|
|
31
|
+
private runCamt053Import;
|
|
32
|
+
private runNestedImport;
|
|
33
|
+
private parseFilterValue;
|
|
34
|
+
private filterFields;
|
|
35
|
+
private sanitizeOutput;
|
|
36
|
+
private getColumns;
|
|
37
|
+
private getValue;
|
|
38
|
+
private printTable;
|
|
39
|
+
private printCsv;
|
|
40
|
+
}
|