@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 = false;
|
|
@@ -29,7 +29,7 @@ export default class DunningRuns extends Command {
|
|
|
29
29
|
limit: Flags.string({ description: 'Items per page' }),
|
|
30
30
|
include: Flags.string({ description: 'Relations to include' }),
|
|
31
31
|
search: Flags.string({ description: 'Search term' }),
|
|
32
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
32
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
33
33
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
34
34
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
35
35
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -103,7 +103,7 @@ export default class DunningRuns extends Command {
|
|
|
103
103
|
if (flags.search)
|
|
104
104
|
queryParams.search = flags.search;
|
|
105
105
|
if (flags['sort-by'])
|
|
106
|
-
queryParams.sortBy = flags['sort-by'];
|
|
106
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
107
107
|
if (flags.query) {
|
|
108
108
|
try {
|
|
109
109
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -562,7 +562,7 @@ export default class DunningRuns extends Command {
|
|
|
562
562
|
if (flags.search)
|
|
563
563
|
baseParams.search = flags.search;
|
|
564
564
|
if (flags['sort-by'])
|
|
565
|
-
baseParams.sortBy = flags['sort-by'];
|
|
565
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
566
566
|
if (flags.include)
|
|
567
567
|
baseParams.include = flags.include;
|
|
568
568
|
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;
|
|
@@ -35,7 +35,7 @@ export default class EmailTransactions extends Command {
|
|
|
35
35
|
limit: Flags.string({ description: 'Items per page' }),
|
|
36
36
|
include: Flags.string({ description: 'Relations to include' }),
|
|
37
37
|
search: Flags.string({ description: 'Search term' }),
|
|
38
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
38
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
39
39
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
40
40
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
41
41
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -109,7 +109,7 @@ export default class EmailTransactions extends Command {
|
|
|
109
109
|
if (flags.search)
|
|
110
110
|
queryParams.search = flags.search;
|
|
111
111
|
if (flags['sort-by'])
|
|
112
|
-
queryParams.sortBy = flags['sort-by'];
|
|
112
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
113
113
|
if (flags.query) {
|
|
114
114
|
try {
|
|
115
115
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -568,7 +568,7 @@ export default class EmailTransactions extends Command {
|
|
|
568
568
|
if (flags.search)
|
|
569
569
|
baseParams.search = flags.search;
|
|
570
570
|
if (flags['sort-by'])
|
|
571
|
-
baseParams.sortBy = flags['sort-by'];
|
|
571
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
572
572
|
if (flags.include)
|
|
573
573
|
baseParams.include = flags.include;
|
|
574
574
|
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;
|
|
@@ -71,7 +71,7 @@ export default class Employees 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 Employees 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 Employees 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 = false;
|
|
@@ -31,7 +31,7 @@ export default class EntityConfigurations extends Command {
|
|
|
31
31
|
limit: Flags.string({ description: 'Items per page' }),
|
|
32
32
|
include: Flags.string({ description: 'Relations to include' }),
|
|
33
33
|
search: Flags.string({ description: 'Search term' }),
|
|
34
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
34
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
35
35
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
36
36
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
37
37
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -105,7 +105,7 @@ export default class EntityConfigurations extends Command {
|
|
|
105
105
|
if (flags.search)
|
|
106
106
|
queryParams.search = flags.search;
|
|
107
107
|
if (flags['sort-by'])
|
|
108
|
-
queryParams.sortBy = flags['sort-by'];
|
|
108
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
109
109
|
if (flags.query) {
|
|
110
110
|
try {
|
|
111
111
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -564,7 +564,7 @@ export default class EntityConfigurations extends Command {
|
|
|
564
564
|
if (flags.search)
|
|
565
565
|
baseParams.search = flags.search;
|
|
566
566
|
if (flags['sort-by'])
|
|
567
|
-
baseParams.sortBy = flags['sort-by'];
|
|
567
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
568
568
|
if (flags.include)
|
|
569
569
|
baseParams.include = flags.include;
|
|
570
570
|
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;
|
|
@@ -39,7 +39,7 @@ export default class EventProcessorMappings 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 EventProcessorMappings 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 EventProcessorMappings 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;
|
|
@@ -41,7 +41,7 @@ export default class FilesInternal 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 FilesInternal 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 FilesInternal 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) {
|
package/dist/commands/health.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;
|
|
@@ -35,7 +35,7 @@ export default class Health extends Command {
|
|
|
35
35
|
limit: Flags.string({ description: 'Items per page' }),
|
|
36
36
|
include: Flags.string({ description: 'Relations to include' }),
|
|
37
37
|
search: Flags.string({ description: 'Search term' }),
|
|
38
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
38
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
39
39
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
40
40
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
41
41
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -109,7 +109,7 @@ export default class Health extends Command {
|
|
|
109
109
|
if (flags.search)
|
|
110
110
|
queryParams.search = flags.search;
|
|
111
111
|
if (flags['sort-by'])
|
|
112
|
-
queryParams.sortBy = flags['sort-by'];
|
|
112
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
113
113
|
if (flags.query) {
|
|
114
114
|
try {
|
|
115
115
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -568,7 +568,7 @@ export default class Health extends Command {
|
|
|
568
568
|
if (flags.search)
|
|
569
569
|
baseParams.search = flags.search;
|
|
570
570
|
if (flags['sort-by'])
|
|
571
|
-
baseParams.sortBy = flags['sort-by'];
|
|
571
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
572
572
|
if (flags.include)
|
|
573
573
|
baseParams.include = flags.include;
|
|
574
574
|
if (flags.query) {
|
package/dist/commands/inbox.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export default class Inbox extends Command {
|
|
|
14
14
|
data: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
15
|
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
16
|
set: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'processing-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
18
|
page: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
19
|
limit: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
20
|
include: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
package/dist/commands/inbox.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
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 = false;
|
|
7
7
|
const HAS_CAMT053 = false;
|
|
8
8
|
const NESTED_IMPORTS = [];
|
|
9
|
-
const SUBCOMMANDS = [...["upload", "email-webhook", "document-types", "list-processing-logs", "processing-logs"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
9
|
+
const SUBCOMMANDS = [...["create-upload", "email-webhook", "document-types", "uploads-files-content", "list-processing-logs", "processing-logs"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
10
10
|
const ENDPOINTS = {
|
|
11
|
-
'upload': { method: 'POST', path: '/v1/inbox/upload', summary: 'Upload document(s) to inbox for processing', pathParams: [], hasBody: false, isMultipart: true, isBinaryResponse: false, bodyArrayFields: [] },
|
|
11
|
+
'create-upload': { method: 'POST', path: '/v1/inbox/upload', summary: 'Upload document(s) to inbox for processing', pathParams: [], hasBody: false, isMultipart: true, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
12
|
'email-webhook': { method: 'POST', path: '/v1/inbox/email-webhook/{secret}', summary: 'Email webhook for document ingestion (SendGrid inbound-parse)', pathParams: ['secret'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
13
13
|
'document-types': { method: 'GET', path: '/v1/inbox/document-types', summary: 'Get available document types and per-parent allowed types', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
14
|
+
'uploads-files-content': { method: 'GET', path: '/v1/inbox/uploads/{processingId}/files/{fileId}/content', summary: 'Stream the original bytes of an uploaded inbox file', pathParams: ['fileId', 'processingId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
14
15
|
'list-processing-logs': { method: 'GET', path: '/v1/inbox/processing-logs', summary: 'List recent inbox processing logs (newest first)', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
15
16
|
'processing-logs': { method: 'GET', path: '/v1/inbox/processing-logs/{processingId}', summary: 'Get a processing run by its processing identifier', pathParams: ['processingId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
16
17
|
};
|
|
@@ -29,11 +30,12 @@ export default class Inbox extends Command {
|
|
|
29
30
|
data: Flags.string({ char: 'd', description: 'JSON data for request body' }),
|
|
30
31
|
file: Flags.string({ char: 'f', description: 'Read request body from file' }),
|
|
31
32
|
set: Flags.string({ char: 's', description: 'Set individual field (e.g. --set firstName=John)', multiple: true }),
|
|
33
|
+
'processing-id': Flags.string({ description: 'Path param: processingId' }),
|
|
32
34
|
page: Flags.string({ description: 'Page number' }),
|
|
33
35
|
limit: Flags.string({ description: 'Items per page' }),
|
|
34
36
|
include: Flags.string({ description: 'Relations to include' }),
|
|
35
37
|
search: Flags.string({ description: 'Search term' }),
|
|
36
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
38
|
+
'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
39
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
38
40
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
39
41
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -107,7 +109,7 @@ export default class Inbox extends Command {
|
|
|
107
109
|
if (flags.search)
|
|
108
110
|
queryParams.search = flags.search;
|
|
109
111
|
if (flags['sort-by'])
|
|
110
|
-
queryParams.sortBy = flags['sort-by'];
|
|
112
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
111
113
|
if (flags.query) {
|
|
112
114
|
try {
|
|
113
115
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -566,7 +568,7 @@ export default class Inbox extends Command {
|
|
|
566
568
|
if (flags.search)
|
|
567
569
|
baseParams.search = flags.search;
|
|
568
570
|
if (flags['sort-by'])
|
|
569
|
-
baseParams.sortBy = flags['sort-by'];
|
|
571
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
570
572
|
if (flags.include)
|
|
571
573
|
baseParams.include = flags.include;
|
|
572
574
|
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;
|
|
@@ -35,7 +35,7 @@ export default class Integrations extends Command {
|
|
|
35
35
|
limit: Flags.string({ description: 'Items per page' }),
|
|
36
36
|
include: Flags.string({ description: 'Relations to include' }),
|
|
37
37
|
search: Flags.string({ description: 'Search term' }),
|
|
38
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
38
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
39
39
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
40
40
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
41
41
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -109,7 +109,7 @@ export default class Integrations extends Command {
|
|
|
109
109
|
if (flags.search)
|
|
110
110
|
queryParams.search = flags.search;
|
|
111
111
|
if (flags['sort-by'])
|
|
112
|
-
queryParams.sortBy = flags['sort-by'];
|
|
112
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
113
113
|
if (flags.query) {
|
|
114
114
|
try {
|
|
115
115
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -568,7 +568,7 @@ export default class Integrations extends Command {
|
|
|
568
568
|
if (flags.search)
|
|
569
569
|
baseParams.search = flags.search;
|
|
570
570
|
if (flags['sort-by'])
|
|
571
|
-
baseParams.sortBy = flags['sort-by'];
|
|
571
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
572
572
|
if (flags.include)
|
|
573
573
|
baseParams.include = flags.include;
|
|
574
574
|
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 ItemCategories 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 ItemCategories 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 ItemCategories 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) {
|
package/dist/commands/items.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;
|
|
@@ -40,7 +40,7 @@ export default class Items 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 Items 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 Items 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;
|
|
@@ -32,7 +32,7 @@ export default class JournalLines extends Command {
|
|
|
32
32
|
limit: Flags.string({ description: 'Items per page' }),
|
|
33
33
|
include: Flags.string({ description: 'Relations to include' }),
|
|
34
34
|
search: Flags.string({ description: 'Search term' }),
|
|
35
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
35
|
+
'sort-by': Flags.string({ description: 'Sort field(s), comma-separated. Direction (:ASC/:DESC) is optional; date-like fields default to DESC, others to ASC.' }),
|
|
36
36
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
37
37
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
38
38
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -106,7 +106,7 @@ export default class JournalLines extends Command {
|
|
|
106
106
|
if (flags.search)
|
|
107
107
|
queryParams.search = flags.search;
|
|
108
108
|
if (flags['sort-by'])
|
|
109
|
-
queryParams.sortBy = flags['sort-by'];
|
|
109
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
110
110
|
if (flags.query) {
|
|
111
111
|
try {
|
|
112
112
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -565,7 +565,7 @@ export default class JournalLines extends Command {
|
|
|
565
565
|
if (flags.search)
|
|
566
566
|
baseParams.search = flags.search;
|
|
567
567
|
if (flags['sort-by'])
|
|
568
|
-
baseParams.sortBy = flags['sort-by'];
|
|
568
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
569
569
|
if (flags.include)
|
|
570
570
|
baseParams.include = flags.include;
|
|
571
571
|
if (flags.query) {
|
|
@@ -1,12 +1,12 @@
|
|
|
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 = ["notes", "files"];
|
|
9
|
-
const SUBCOMMANDS = [...["list", "create", "get", "update", "delete", "post", "approve", "cancel", "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", "get", "update", "delete", "post", "approve", "cancel", "get-deferrals", "create-deferrals", "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/journals', summary: 'List all journals', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
12
|
'create': { method: 'POST', path: '/v1/journals', summary: 'Create a new journal (with embedded lines)', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['tagIds', 'lines', 'notes'] },
|
|
@@ -16,6 +16,8 @@ const ENDPOINTS = {
|
|
|
16
16
|
'post': { method: 'POST', path: '/v1/journals/{id}/post', summary: 'Post journal (finalize)', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
17
17
|
'approve': { method: 'POST', path: '/v1/journals/{id}/approve', summary: 'Approve a journal (transitions DRAFT to APPROVED)', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
18
18
|
'cancel': { method: 'POST', path: '/v1/journals/{id}/cancel', summary: 'Cancel a journal', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
19
|
+
'get-deferrals': { method: 'GET', path: '/v1/journals/{id}/deferrals', summary: 'List the deferral schedules of a journal', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
20
|
+
'create-deferrals': { method: 'POST', path: '/v1/journals/{id}/deferrals', summary: 'Create deferral schedules for one line of a journal (manual trigger)', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['periods'] },
|
|
19
21
|
'list-notes': { method: 'GET', path: '/v1/journals/{journalId}/notes', summary: 'Get all notes for a journal', pathParams: ['journalId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
20
22
|
'create-notes': { method: 'POST', path: '/v1/journals/{journalId}/notes', summary: 'Create a note for a journal', pathParams: ['journalId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
21
23
|
'get-notes': { method: 'GET', path: '/v1/journals/{journalId}/notes/{noteId}', summary: 'Get a specific note for a journal', pathParams: ['journalId', 'noteId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
@@ -56,7 +58,7 @@ export default class Journals extends Command {
|
|
|
56
58
|
limit: Flags.string({ description: 'Items per page' }),
|
|
57
59
|
include: Flags.string({ description: 'Relations to include' }),
|
|
58
60
|
search: Flags.string({ description: 'Search term' }),
|
|
59
|
-
'sort-by': Flags.string({ description: 'Sort field' }),
|
|
61
|
+
'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
62
|
filter: Flags.string({ description: 'Filter (e.g. --filter status=ACTIVE). Operators: in:A,B, like:%, gt:, lt:, null:', multiple: true }),
|
|
61
63
|
query: Flags.string({ description: 'Additional query params as JSON' }),
|
|
62
64
|
fields: Flags.string({ description: 'Comma-separated list of fields to show (e.g. --fields=id,name,status)' }),
|
|
@@ -130,7 +132,7 @@ export default class Journals extends Command {
|
|
|
130
132
|
if (flags.search)
|
|
131
133
|
queryParams.search = flags.search;
|
|
132
134
|
if (flags['sort-by'])
|
|
133
|
-
queryParams.sortBy = flags['sort-by'];
|
|
135
|
+
queryParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
134
136
|
if (flags.query) {
|
|
135
137
|
try {
|
|
136
138
|
Object.assign(queryParams, JSON.parse(flags.query));
|
|
@@ -589,7 +591,7 @@ export default class Journals extends Command {
|
|
|
589
591
|
if (flags.search)
|
|
590
592
|
baseParams.search = flags.search;
|
|
591
593
|
if (flags['sort-by'])
|
|
592
|
-
baseParams.sortBy = flags['sort-by'];
|
|
594
|
+
baseParams.sortBy = normalizeSortBy(flags['sort-by']);
|
|
593
595
|
if (flags.include)
|
|
594
596
|
baseParams.include = flags.include;
|
|
595
597
|
if (flags.query) {
|
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) {
|