@aderis-erp/cli 1.0.13 → 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-platform.js +4 -4
- package/dist/commands/audit-log.js +7 -7
- 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 +4 -4
- package/dist/commands/credit-card-accounts.js +4 -4
- package/dist/commands/delivery-notes.js +8 -6
- 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 +8 -6
- 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 +4 -4
- package/dist/commands/payment-terms.js +4 -4
- package/dist/commands/payments.js +4 -4
- 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 +6 -6
- package/dist/commands/sales-orders.js +4 -4
- package/dist/commands/saved-views.js +4 -4
- package/dist/commands/scheduled-processor-mappings.d.ts +40 -0
- package/dist/commands/scheduled-processor-mappings.js +1178 -0
- package/dist/commands/schedules.js +4 -4
- 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 +6 -6
- 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 +4 -4
- 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/oclif.manifest.json +234 -60
- package/package.json +1 -1
|
@@ -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 PaymentRuns 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 PaymentRuns 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 PaymentRuns 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;
|
|
@@ -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) {
|
|
@@ -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;
|
|
@@ -42,7 +42,7 @@ export default class Payments extends Command {
|
|
|
42
42
|
limit: Flags.string({ description: 'Items per page' }),
|
|
43
43
|
include: Flags.string({ description: 'Relations to include' }),
|
|
44
44
|
search: Flags.string({ description: 'Search term' }),
|
|
45
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
45
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
46
46
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
47
47
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
48
48
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -116,7 +116,7 @@ export default class Payments extends Command {
|
|
|
116
116
|
if (flags.search)
|
|
117
117
|
queryParams.search = flags.search;
|
|
118
118
|
if (flags['sort-by'])
|
|
119
|
-
queryParams.sortBy = flags['sort-by'];
|
|
119
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
120
120
|
if (flags.query) {
|
|
121
121
|
try {
|
|
122
122
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -575,7 +575,7 @@ export default class Payments extends Command {
|
|
|
575
575
|
if (flags.search)
|
|
576
576
|
baseParams.search = flags.search;
|
|
577
577
|
if (flags['sort-by'])
|
|
578
|
-
baseParams.sortBy = flags['sort-by'];
|
|
578
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
579
579
|
if (flags.include)
|
|
580
580
|
baseParams.include = flags.include;
|
|
581
581
|
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 PriceLists 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 PriceLists 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 PriceLists 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,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;
|
|
@@ -38,7 +38,7 @@ export default class ProcessorMappings extends Command {
|
|
|
38
38
|
limit: Flags.string({ description: 'Items per page' }),
|
|
39
39
|
include: Flags.string({ description: 'Relations to include' }),
|
|
40
40
|
search: Flags.string({ description: 'Search term' }),
|
|
41
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
41
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
42
42
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
43
43
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
44
44
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -112,7 +112,7 @@ export default class ProcessorMappings extends Command {
|
|
|
112
112
|
if (flags.search)
|
|
113
113
|
queryParams.search = flags.search;
|
|
114
114
|
if (flags['sort-by'])
|
|
115
|
-
queryParams.sortBy = flags['sort-by'];
|
|
115
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
116
116
|
if (flags.query) {
|
|
117
117
|
try {
|
|
118
118
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -571,7 +571,7 @@ export default class ProcessorMappings extends Command {
|
|
|
571
571
|
if (flags.search)
|
|
572
572
|
baseParams.search = flags.search;
|
|
573
573
|
if (flags['sort-by'])
|
|
574
|
-
baseParams.sortBy = flags['sort-by'];
|
|
574
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
575
575
|
if (flags.include)
|
|
576
576
|
baseParams.include = flags.include;
|
|
577
577
|
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 Processors 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 Processors 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 Processors 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,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 PurchaseOrderTypes 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 PurchaseOrderTypes 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 PurchaseOrderTypes 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;
|
|
@@ -54,7 +54,7 @@ export default class PurchaseOrders extends Command {
|
|
|
54
54
|
limit: Flags.string({ description: 'Items per page' }),
|
|
55
55
|
include: Flags.string({ description: 'Relations to include' }),
|
|
56
56
|
search: Flags.string({ description: 'Search term' }),
|
|
57
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
57
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
58
58
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
59
59
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
60
60
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -128,7 +128,7 @@ export default class PurchaseOrders extends Command {
|
|
|
128
128
|
if (flags.search)
|
|
129
129
|
queryParams.search = flags.search;
|
|
130
130
|
if (flags['sort-by'])
|
|
131
|
-
queryParams.sortBy = flags['sort-by'];
|
|
131
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
132
132
|
if (flags.query) {
|
|
133
133
|
try {
|
|
134
134
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -587,7 +587,7 @@ export default class PurchaseOrders extends Command {
|
|
|
587
587
|
if (flags.search)
|
|
588
588
|
baseParams.search = flags.search;
|
|
589
589
|
if (flags['sort-by'])
|
|
590
|
-
baseParams.sortBy = flags['sort-by'];
|
|
590
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
591
591
|
if (flags.include)
|
|
592
592
|
baseParams.include = flags.include;
|
|
593
593
|
if (flags.query) {
|
package/dist/commands/reports.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 = false;
|
|
@@ -33,7 +33,7 @@ export default class Reports extends Command {
|
|
|
33
33
|
limit: Flags.string({ description: 'Items per page' }),
|
|
34
34
|
include: Flags.string({ description: 'Relations to include' }),
|
|
35
35
|
search: Flags.string({ description: 'Search term' }),
|
|
36
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
36
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
37
37
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
38
38
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
39
39
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -107,7 +107,7 @@ export default class Reports extends Command {
|
|
|
107
107
|
if (flags.search)
|
|
108
108
|
queryParams.search = flags.search;
|
|
109
109
|
if (flags['sort-by'])
|
|
110
|
-
queryParams.sortBy = flags['sort-by'];
|
|
110
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
111
111
|
if (flags.query) {
|
|
112
112
|
try {
|
|
113
113
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -566,7 +566,7 @@ export default class Reports extends Command {
|
|
|
566
566
|
if (flags.search)
|
|
567
567
|
baseParams.search = flags.search;
|
|
568
568
|
if (flags['sort-by'])
|
|
569
|
-
baseParams.sortBy = flags['sort-by'];
|
|
569
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
570
570
|
if (flags.include)
|
|
571
571
|
baseParams.include = flags.include;
|
|
572
572
|
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 SalaryTypes 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 SalaryTypes 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 SalaryTypes 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;
|
|
@@ -25,10 +25,10 @@ const ENDPOINTS = {
|
|
|
25
25
|
'copy': { method: 'POST', path: '/v1/sales-invoices/{id}/copy', summary: 'Create a copy of a cancelled invoice', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
26
26
|
'replace': { method: 'POST', path: '/v1/sales-invoices/{id}/replace', summary: 'Replace invoice with corrected version (creates new CORRECTED_INVOICE)', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
27
27
|
'merge': { method: 'POST', path: '/v1/sales-invoices/{id}/merge', summary: 'Merge draft invoices into this master', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['sourceIds'] },
|
|
28
|
-
'create-line-items': { method: 'POST', path: '/v1/sales-invoices/{invoiceId}/line-items', summary: 'Add a line item to a sales invoice', pathParams: ['invoiceId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['discounts', 'salesOrderLineItems'] },
|
|
28
|
+
'create-line-items': { method: 'POST', path: '/v1/sales-invoices/{invoiceId}/line-items', summary: 'Add a line item to a sales invoice', pathParams: ['invoiceId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['discounts', 'salesOrderLineItems', 'deliveryNoteLineItems'] },
|
|
29
29
|
'line-items-from-sales-order': { method: 'POST', path: '/v1/sales-invoices/{invoiceId}/line-items/from-sales-order', summary: 'Add line items to a sales invoice from a sales order', pathParams: ['invoiceId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['lines'] },
|
|
30
30
|
'update-line-items-reorder': { method: 'PATCH', path: '/v1/sales-invoices/{invoiceId}/line-items/reorder', summary: 'Bulk reorder line items (drag-and-drop)', pathParams: ['invoiceId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['items'] },
|
|
31
|
-
'update-line-items': { method: 'PATCH', path: '/v1/sales-invoices/{invoiceId}/line-items/{lineItemId}', summary: 'Update a line item on a sales invoice', pathParams: ['invoiceId', 'lineItemId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['discounts', 'salesOrderLineItems'] },
|
|
31
|
+
'update-line-items': { method: 'PATCH', path: '/v1/sales-invoices/{invoiceId}/line-items/{lineItemId}', summary: 'Update a line item on a sales invoice', pathParams: ['invoiceId', 'lineItemId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['discounts', 'salesOrderLineItems', 'deliveryNoteLineItems'] },
|
|
32
32
|
'delete-line-items': { method: 'DELETE', path: '/v1/sales-invoices/{invoiceId}/line-items/{lineItemId}', summary: 'Remove a line item from a sales invoice', pathParams: ['invoiceId', 'lineItemId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
33
33
|
'list-notes': { method: 'GET', path: '/v1/sales-invoices/{salesInvoiceId}/notes', summary: 'Get all notes for a sales invoice', pathParams: ['salesInvoiceId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
34
34
|
'create-notes': { method: 'POST', path: '/v1/sales-invoices/{salesInvoiceId}/notes', summary: 'Create a note for a sales invoice', pathParams: ['salesInvoiceId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
@@ -71,7 +71,7 @@ export default class SalesInvoices extends Command {
|
|
|
71
71
|
limit: Flags.string({ description: 'Items per page' }),
|
|
72
72
|
include: Flags.string({ description: 'Relations to include' }),
|
|
73
73
|
search: Flags.string({ description: 'Search term' }),
|
|
74
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
74
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
75
75
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
76
76
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
77
77
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -145,7 +145,7 @@ export default class SalesInvoices extends Command {
|
|
|
145
145
|
if (flags.search)
|
|
146
146
|
queryParams.search = flags.search;
|
|
147
147
|
if (flags['sort-by'])
|
|
148
|
-
queryParams.sortBy = flags['sort-by'];
|
|
148
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
149
149
|
if (flags.query) {
|
|
150
150
|
try {
|
|
151
151
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -604,7 +604,7 @@ export default class SalesInvoices extends Command {
|
|
|
604
604
|
if (flags.search)
|
|
605
605
|
baseParams.search = flags.search;
|
|
606
606
|
if (flags['sort-by'])
|
|
607
|
-
baseParams.sortBy = flags['sort-by'];
|
|
607
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
608
608
|
if (flags.include)
|
|
609
609
|
baseParams.include = flags.include;
|
|
610
610
|
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;
|
|
@@ -69,7 +69,7 @@ export default class SalesOrders extends Command {
|
|
|
69
69
|
limit: Flags.string({ description: 'Items per page' }),
|
|
70
70
|
include: Flags.string({ description: 'Relations to include' }),
|
|
71
71
|
search: Flags.string({ description: 'Search term' }),
|
|
72
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
72
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
73
73
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
74
74
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
75
75
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -143,7 +143,7 @@ export default class SalesOrders extends Command {
|
|
|
143
143
|
if (flags.search)
|
|
144
144
|
queryParams.search = flags.search;
|
|
145
145
|
if (flags['sort-by'])
|
|
146
|
-
queryParams.sortBy = flags['sort-by'];
|
|
146
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
147
147
|
if (flags.query) {
|
|
148
148
|
try {
|
|
149
149
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -602,7 +602,7 @@ export default class SalesOrders extends Command {
|
|
|
602
602
|
if (flags.search)
|
|
603
603
|
baseParams.search = flags.search;
|
|
604
604
|
if (flags['sort-by'])
|
|
605
|
-
baseParams.sortBy = flags['sort-by'];
|
|
605
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
606
606
|
if (flags.include)
|
|
607
607
|
baseParams.include = flags.include;
|
|
608
608
|
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 = false;
|
|
@@ -34,7 +34,7 @@ export default class SavedViews extends Command {
|
|
|
34
34
|
limit: Flags.string({ description: 'Items per page' }),
|
|
35
35
|
include: Flags.string({ description: 'Relations to include' }),
|
|
36
36
|
search: Flags.string({ description: 'Search term' }),
|
|
37
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
37
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
38
38
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
39
39
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
40
40
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -108,7 +108,7 @@ export default class SavedViews extends Command {
|
|
|
108
108
|
if (flags.search)
|
|
109
109
|
queryParams.search = flags.search;
|
|
110
110
|
if (flags['sort-by'])
|
|
111
|
-
queryParams.sortBy = flags['sort-by'];
|
|
111
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
112
112
|
if (flags.query) {
|
|
113
113
|
try {
|
|
114
114
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -567,7 +567,7 @@ export default class SavedViews extends Command {
|
|
|
567
567
|
if (flags.search)
|
|
568
568
|
baseParams.search = flags.search;
|
|
569
569
|
if (flags['sort-by'])
|
|
570
|
-
baseParams.sortBy = flags['sort-by'];
|
|
570
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
571
571
|
if (flags.include)
|
|
572
572
|
baseParams.include = flags.include;
|
|
573
573
|
if (flags.query) {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class ScheduledProcessorMappings 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
|
+
}
|