@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;
|
|
@@ -40,7 +40,7 @@ export default class AccessGroups 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 AccessGroups 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 AccessGroups 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 = false;
|
|
@@ -34,7 +34,7 @@ export default class AccountTransactionAllocations 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 AccountTransactionAllocations 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 AccountTransactionAllocations 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) {
|
|
@@ -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;
|
|
@@ -56,7 +56,7 @@ export default class AccountTransactions extends Command {
|
|
|
56
56
|
limit: Flags.string({ description: 'Items per page' }),
|
|
57
57
|
include: Flags.string({ description: 'Relations to include' }),
|
|
58
58
|
search: Flags.string({ description: 'Search term' }),
|
|
59
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
59
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
60
60
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
61
61
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
62
62
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -130,7 +130,7 @@ export default class AccountTransactions extends Command {
|
|
|
130
130
|
if (flags.search)
|
|
131
131
|
queryParams.search = flags.search;
|
|
132
132
|
if (flags['sort-by'])
|
|
133
|
-
queryParams.sortBy = flags['sort-by'];
|
|
133
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
134
134
|
if (flags.query) {
|
|
135
135
|
try {
|
|
136
136
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -589,7 +589,7 @@ export default class AccountTransactions extends Command {
|
|
|
589
589
|
if (flags.search)
|
|
590
590
|
baseParams.search = flags.search;
|
|
591
591
|
if (flags['sort-by'])
|
|
592
|
-
baseParams.sortBy = flags['sort-by'];
|
|
592
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
593
593
|
if (flags.include)
|
|
594
594
|
baseParams.include = flags.include;
|
|
595
595
|
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 Accounts 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 Accounts 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 Accounts 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 = false;
|
|
@@ -37,7 +37,7 @@ export default class AgentPlatform extends Command {
|
|
|
37
37
|
limit: Flags.string({ description: 'Items per page' }),
|
|
38
38
|
include: Flags.string({ description: 'Relations to include' }),
|
|
39
39
|
search: Flags.string({ description: 'Search term' }),
|
|
40
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
40
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
41
41
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
42
42
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
43
43
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -111,7 +111,7 @@ export default class AgentPlatform extends Command {
|
|
|
111
111
|
if (flags.search)
|
|
112
112
|
queryParams.search = flags.search;
|
|
113
113
|
if (flags['sort-by'])
|
|
114
|
-
queryParams.sortBy = flags['sort-by'];
|
|
114
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
115
115
|
if (flags.query) {
|
|
116
116
|
try {
|
|
117
117
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -570,7 +570,7 @@ export default class AgentPlatform extends Command {
|
|
|
570
570
|
if (flags.search)
|
|
571
571
|
baseParams.search = flags.search;
|
|
572
572
|
if (flags['sort-by'])
|
|
573
|
-
baseParams.sortBy = flags['sort-by'];
|
|
573
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
574
574
|
if (flags.include)
|
|
575
575
|
baseParams.include = flags.include;
|
|
576
576
|
if (flags.query) {
|
|
@@ -1,21 +1,21 @@
|
|
|
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;
|
|
6
6
|
const HAS_EXPORT = true;
|
|
7
7
|
const HAS_CAMT053 = false;
|
|
8
8
|
const NESTED_IMPORTS = [];
|
|
9
|
-
const SUBCOMMANDS = [...["list", "
|
|
9
|
+
const SUBCOMMANDS = [...["list", "get"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
10
10
|
const ENDPOINTS = {
|
|
11
11
|
'list': { method: 'GET', path: '/v1/audit-logs', summary: 'Get audit log entries', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
|
-
'
|
|
13
|
-
'find-workflow': { method: 'GET', path: '/v1/audit-logs/workflow/{workflowId}', summary: 'Get audit log entries for a specific workflow', pathParams: ['workflowId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
|
+
'get': { method: 'GET', path: '/v1/audit-logs/{id}', summary: 'Get a single audit log entry', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
14
13
|
};
|
|
15
14
|
export default class AuditLog extends Command {
|
|
16
15
|
static description = 'Manage audit log';
|
|
17
16
|
static examples = [
|
|
18
17
|
'<%= config.bin %> audit-log list',
|
|
18
|
+
'<%= config.bin %> audit-log get <id>',
|
|
19
19
|
'<%= config.bin %> audit-log export --csv > audit-log.csv',
|
|
20
20
|
];
|
|
21
21
|
static args = {
|
|
@@ -34,7 +34,7 @@ export default class AuditLog 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 AuditLog 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 AuditLog 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) {
|
|
@@ -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 BankAccounts 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 BankAccounts 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 BankAccounts 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) {
|
|
@@ -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;
|
|
@@ -55,7 +55,7 @@ export default class BankIntegrations extends Command {
|
|
|
55
55
|
limit: Flags.string({ description: 'Items per page' }),
|
|
56
56
|
include: Flags.string({ description: 'Relations to include' }),
|
|
57
57
|
search: Flags.string({ description: 'Search term' }),
|
|
58
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
58
|
+
'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
59
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
60
60
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
61
61
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -129,7 +129,7 @@ export default class BankIntegrations extends Command {
|
|
|
129
129
|
if (flags.search)
|
|
130
130
|
queryParams.search = flags.search;
|
|
131
131
|
if (flags['sort-by'])
|
|
132
|
-
queryParams.sortBy = flags['sort-by'];
|
|
132
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
133
133
|
if (flags.query) {
|
|
134
134
|
try {
|
|
135
135
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -588,7 +588,7 @@ export default class BankIntegrations extends Command {
|
|
|
588
588
|
if (flags.search)
|
|
589
589
|
baseParams.search = flags.search;
|
|
590
590
|
if (flags['sort-by'])
|
|
591
|
-
baseParams.sortBy = flags['sort-by'];
|
|
591
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
592
592
|
if (flags.include)
|
|
593
593
|
baseParams.include = flags.include;
|
|
594
594
|
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;
|
|
@@ -9,9 +9,9 @@ const NESTED_IMPORTS = ["notes", "contacts", "contacts-notes"];
|
|
|
9
9
|
const SUBCOMMANDS = [...["list", "create", "get", "update", "delete", "merge", "activate", "list-notes", "create-notes", "get-notes", "update-notes", "delete-notes", "list-contacts", "create-contacts", "get-contacts", "update-contacts", "delete-contacts", "list-contacts-notes", "create-contacts-notes", "get-contacts-notes", "update-contacts-notes", "delete-contacts-notes"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
10
10
|
const ENDPOINTS = {
|
|
11
11
|
'list': { method: 'GET', path: '/v1/business-partners', summary: 'Get all business partners with pagination', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
|
-
'create': { method: 'POST', path: '/v1/business-partners', summary: 'Create a new business partner', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['
|
|
12
|
+
'create': { method: 'POST', path: '/v1/business-partners', summary: 'Create a new business partner', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['salesOrderRecipientCc', 'salesOrderRecipientBcc', 'salesInvoiceRecipientCc', 'salesInvoiceRecipientBcc', 'deliveryNoteRecipientCc', 'deliveryNoteRecipientBcc', 'contacts', 'tagIds', 'salesEarlyPaymentDiscounts', 'purchaseEarlyPaymentDiscounts', 'notes'] },
|
|
13
13
|
'get': { method: 'GET', path: '/v1/business-partners/{id}', summary: 'Get a business partner by ID', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
14
|
-
'update': { method: 'PATCH', path: '/v1/business-partners/{id}', summary: 'Update a business partner', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['
|
|
14
|
+
'update': { method: 'PATCH', path: '/v1/business-partners/{id}', summary: 'Update a business partner', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['salesOrderRecipientCc', 'salesOrderRecipientBcc', 'salesInvoiceRecipientCc', 'salesInvoiceRecipientBcc', 'deliveryNoteRecipientCc', 'deliveryNoteRecipientBcc', 'contacts', 'tagIds', 'salesEarlyPaymentDiscounts', 'purchaseEarlyPaymentDiscounts', 'notes'] },
|
|
15
15
|
'delete': { method: 'DELETE', path: '/v1/business-partners/{id}', summary: 'Delete a business partner', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
16
16
|
'merge': { method: 'POST', path: '/v1/business-partners/{id}/merge', summary: 'Merge a business partner into another', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
17
17
|
'activate': { method: 'POST', path: '/v1/business-partners/{id}/activate', summary: 'Activate a business partner', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
@@ -59,7 +59,7 @@ export default class BusinessPartners extends Command {
|
|
|
59
59
|
limit: Flags.string({ description: 'Items per page' }),
|
|
60
60
|
include: Flags.string({ description: 'Relations to include' }),
|
|
61
61
|
search: Flags.string({ description: 'Search term' }),
|
|
62
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
62
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
63
63
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
64
64
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
65
65
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -133,7 +133,7 @@ export default class BusinessPartners extends Command {
|
|
|
133
133
|
if (flags.search)
|
|
134
134
|
queryParams.search = flags.search;
|
|
135
135
|
if (flags['sort-by'])
|
|
136
|
-
queryParams.sortBy = flags['sort-by'];
|
|
136
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
137
137
|
if (flags.query) {
|
|
138
138
|
try {
|
|
139
139
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -592,7 +592,7 @@ export default class BusinessPartners extends Command {
|
|
|
592
592
|
if (flags.search)
|
|
593
593
|
baseParams.search = flags.search;
|
|
594
594
|
if (flags['sort-by'])
|
|
595
|
-
baseParams.sortBy = flags['sort-by'];
|
|
595
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
596
596
|
if (flags.include)
|
|
597
597
|
baseParams.include = flags.include;
|
|
598
598
|
if (flags.query) {
|
package/dist/commands/chat.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;
|
|
@@ -39,7 +39,7 @@ export default class Chat extends Command {
|
|
|
39
39
|
limit: Flags.string({ description: 'Items per page' }),
|
|
40
40
|
include: Flags.string({ description: 'Relations to include' }),
|
|
41
41
|
search: Flags.string({ description: 'Search term' }),
|
|
42
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
42
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
43
43
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
44
44
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
45
45
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -113,7 +113,7 @@ export default class Chat extends Command {
|
|
|
113
113
|
if (flags.search)
|
|
114
114
|
queryParams.search = flags.search;
|
|
115
115
|
if (flags['sort-by'])
|
|
116
|
-
queryParams.sortBy = flags['sort-by'];
|
|
116
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
117
117
|
if (flags.query) {
|
|
118
118
|
try {
|
|
119
119
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -572,7 +572,7 @@ export default class Chat extends Command {
|
|
|
572
572
|
if (flags.search)
|
|
573
573
|
baseParams.search = flags.search;
|
|
574
574
|
if (flags['sort-by'])
|
|
575
|
-
baseParams.sortBy = flags['sort-by'];
|
|
575
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
576
576
|
if (flags.include)
|
|
577
577
|
baseParams.include = flags.include;
|
|
578
578
|
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;
|
|
@@ -52,7 +52,7 @@ export default class CreditCardAccounts extends Command {
|
|
|
52
52
|
limit: Flags.string({ description: 'Items per page' }),
|
|
53
53
|
include: Flags.string({ description: 'Relations to include' }),
|
|
54
54
|
search: Flags.string({ description: 'Search term' }),
|
|
55
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
55
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
56
56
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
57
57
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
58
58
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -126,7 +126,7 @@ export default class CreditCardAccounts extends Command {
|
|
|
126
126
|
if (flags.search)
|
|
127
127
|
queryParams.search = flags.search;
|
|
128
128
|
if (flags['sort-by'])
|
|
129
|
-
queryParams.sortBy = flags['sort-by'];
|
|
129
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
130
130
|
if (flags.query) {
|
|
131
131
|
try {
|
|
132
132
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -585,7 +585,7 @@ export default class CreditCardAccounts extends Command {
|
|
|
585
585
|
if (flags.search)
|
|
586
586
|
baseParams.search = flags.search;
|
|
587
587
|
if (flags['sort-by'])
|
|
588
|
-
baseParams.sortBy = flags['sort-by'];
|
|
588
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
589
589
|
if (flags.include)
|
|
590
590
|
baseParams.include = flags.include;
|
|
591
591
|
if (flags.query) {
|
|
@@ -1,26 +1,28 @@
|
|
|
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 = ["line-items", "notes", "files"];
|
|
9
|
-
const SUBCOMMANDS = [...["list", "create", "create-from-orders", "create-from-invoice", "get", "update", "delete", "pdf", "submit", "approve", "cancel", "deliver", "ship", "create-line-items", "update-line-items-reorder", "update-line-items", "delete-line-items", "list-notes", "create-notes", "get-notes", "update-notes", "delete-notes", "list-files", "create-files", "get-files", "update-files", "delete-files", "files-download"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
9
|
+
const SUBCOMMANDS = [...["list", "create", "create-from-orders", "create-from-invoice", "create-invoice", "get", "update", "delete", "pdf", "submit", "approve", "cancel", "deliver", "ship", "send", "create-line-items", "update-line-items-reorder", "update-line-items", "delete-line-items", "list-notes", "create-notes", "get-notes", "update-notes", "delete-notes", "list-files", "create-files", "get-files", "update-files", "delete-files", "files-download"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
10
10
|
const ENDPOINTS = {
|
|
11
11
|
'list': { method: 'GET', path: '/v1/delivery-notes', summary: 'Get all delivery notes with pagination', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
12
|
'create': { method: 'POST', path: '/v1/delivery-notes', summary: 'Create a new delivery note', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['files', 'notes', 'tagIds', 'lineItems'] },
|
|
13
13
|
'create-from-orders': { method: 'POST', path: '/v1/delivery-notes/create-from-orders', summary: 'Create a DRAFT delivery note from several sales orders', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['salesOrderIds'] },
|
|
14
14
|
'create-from-invoice': { method: 'POST', path: '/v1/delivery-notes/create-from-invoice', summary: 'Create a DRAFT delivery note from a sales invoice', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
15
|
+
'create-invoice': { method: 'POST', path: '/v1/delivery-notes/create-invoice', summary: 'Create ONE draft sales invoice from several delivery notes (same customer)', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['deliveryNoteIds'] },
|
|
15
16
|
'get': { method: 'GET', path: '/v1/delivery-notes/{id}', summary: 'Get a delivery note by ID', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
16
17
|
'update': { method: 'PATCH', path: '/v1/delivery-notes/{id}', summary: 'Update a delivery note', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['files', 'notes', 'tagIds', 'removeFileIds'] },
|
|
17
18
|
'delete': { method: 'DELETE', path: '/v1/delivery-notes/{id}', summary: 'Delete a delivery note', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
18
19
|
'pdf': { method: 'GET', path: '/v1/delivery-notes/{id}/pdf', summary: 'Render a delivery note PDF using the configured PDF processor', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
19
20
|
'submit': { method: 'POST', path: '/v1/delivery-notes/{id}/submit', summary: 'Submit a delivery note for approval (DRAFT → PENDING_APPROVAL)', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
20
21
|
'approve': { method: 'POST', path: '/v1/delivery-notes/{id}/approve', summary: 'Approve a delivery note (DRAFT or PENDING_APPROVAL → APPROVED)', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
21
|
-
'cancel': { method: 'POST', path: '/v1/delivery-notes/{id}/cancel', summary: 'Cancel a delivery note (DRAFT / PENDING_APPROVAL / APPROVED → CANCELLED)', pathParams: ['id'], hasBody:
|
|
22
|
+
'cancel': { method: 'POST', path: '/v1/delivery-notes/{id}/cancel', summary: 'Cancel a delivery note (DRAFT / PENDING_APPROVAL / APPROVED → CANCELLED)', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
22
23
|
'deliver': { method: 'POST', path: '/v1/delivery-notes/{id}/deliver', summary: 'Mark a delivery note as delivered (SHIPPED → DELIVERED)', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
23
24
|
'ship': { method: 'POST', path: '/v1/delivery-notes/{id}/ship', summary: 'Ship a delivery note (APPROVED → SHIPPED)', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['lineItems'] },
|
|
25
|
+
'send': { method: 'POST', path: '/v1/delivery-notes/{id}/send', summary: 'Send a delivery note to its recipient by email', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['emailCc', 'emailBcc'] },
|
|
24
26
|
'create-line-items': { method: 'POST', path: '/v1/delivery-notes/{noteId}/line-items', summary: 'Add a line item to a delivery note', pathParams: ['noteId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['salesOrderLineItems'] },
|
|
25
27
|
'update-line-items-reorder': { method: 'PATCH', path: '/v1/delivery-notes/{noteId}/line-items/reorder', summary: 'Bulk reorder line items (drag-and-drop)', pathParams: ['noteId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['items'] },
|
|
26
28
|
'update-line-items': { method: 'PATCH', path: '/v1/delivery-notes/{noteId}/line-items/{lineItemId}', summary: 'Update a line item on a delivery note', pathParams: ['noteId', 'lineItemId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['salesOrderLineItems'] },
|
|
@@ -66,7 +68,7 @@ export default class DeliveryNotes extends Command {
|
|
|
66
68
|
limit: Flags.string({ description: 'Items per page' }),
|
|
67
69
|
include: Flags.string({ description: 'Relations to include' }),
|
|
68
70
|
search: Flags.string({ description: 'Search term' }),
|
|
69
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
71
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
70
72
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
71
73
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
72
74
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -140,7 +142,7 @@ export default class DeliveryNotes extends Command {
|
|
|
140
142
|
if (flags.search)
|
|
141
143
|
queryParams.search = flags.search;
|
|
142
144
|
if (flags['sort-by'])
|
|
143
|
-
queryParams.sortBy = flags['sort-by'];
|
|
145
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
144
146
|
if (flags.query) {
|
|
145
147
|
try {
|
|
146
148
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -599,7 +601,7 @@ export default class DeliveryNotes extends Command {
|
|
|
599
601
|
if (flags.search)
|
|
600
602
|
baseParams.search = flags.search;
|
|
601
603
|
if (flags['sort-by'])
|
|
602
|
-
baseParams.sortBy = flags['sort-by'];
|
|
604
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
603
605
|
if (flags.include)
|
|
604
606
|
baseParams.include = flags.include;
|
|
605
607
|
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;
|
|
@@ -10,7 +10,7 @@ const SUBCOMMANDS = [...["list", "create", "get", "update", "delete", "reclassif
|
|
|
10
10
|
const ENDPOINTS = {
|
|
11
11
|
'list': { method: 'GET', path: '/v1/documents', summary: 'List documents (paginated)', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
12
|
'create': { method: 'POST', path: '/v1/documents', summary: 'Create a new document (letterbox)', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['references', 'tags', 'files'] },
|
|
13
|
-
'get': { method: 'GET', path: '/v1/documents/{id}', summary: 'Get document
|
|
13
|
+
'get': { method: 'GET', path: '/v1/documents/{id}', summary: 'Get a document, optionally with related data via include', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
14
14
|
'update': { method: 'PATCH', path: '/v1/documents/{id}', summary: 'Patch an existing document', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['references', 'tags', 'files'] },
|
|
15
15
|
'delete': { method: 'DELETE', path: '/v1/documents/{id}', summary: 'Soft-delete (discard) a document', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
16
16
|
'reclassify': { method: 'POST', path: '/v1/documents/{id}/reclassify', summary: 'Reclassify a document to a new type', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
@@ -41,7 +41,7 @@ export default class Documents 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 Documents 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 Documents 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;
|
|
@@ -40,7 +40,7 @@ export default class DunningConfigs 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 DunningConfigs 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 DunningConfigs 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 = false;
|
|
@@ -41,7 +41,7 @@ export default class DunningReminders 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 DunningReminders 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 DunningReminders 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) {
|