@aderis-erp/cli 1.0.7 → 1.0.9
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/account-transactions.js +2 -2
- package/dist/commands/audit-log.js +3 -3
- package/dist/commands/business-partners.d.ts +1 -0
- package/dist/commands/business-partners.js +15 -2
- package/dist/commands/payment-methods.d.ts +1 -0
- package/dist/commands/payment-methods.js +8 -2
- package/dist/commands/{reconciliation.d.ts → saved-views.d.ts} +1 -1
- package/dist/commands/{payment-method-ledger-mappings.js → saved-views.js} +14 -14
- package/dist/commands/{vat-declaration.d.ts → vat-declarations.d.ts} +1 -1
- package/dist/commands/{vat-declaration.js → vat-declarations.js} +25 -21
- package/oclif.manifest.json +97 -422
- package/package.json +1 -1
- package/dist/commands/business-partners---contacts.d.ts +0 -42
- package/dist/commands/business-partners---contacts.js +0 -1074
- package/dist/commands/payment-method-ledger-mappings.d.ts +0 -41
- package/dist/commands/reconciliation.js +0 -1071
|
@@ -9,9 +9,9 @@ const NESTED_IMPORTS = ["allocations", "allocations-notes"];
|
|
|
9
9
|
const SUBCOMMANDS = [...["list", "create", "get", "update", "delete", "list-allocations", "create-allocations", "get-allocations", "update-allocations", "delete-allocations", "allocations-confirm", "import-camt053", "list-allocations-notes", "create-allocations-notes", "get-allocations-notes", "update-allocations-notes", "delete-allocations-notes"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
10
10
|
const ENDPOINTS = {
|
|
11
11
|
'list': { method: 'GET', path: '/v1/account-transactions', summary: 'Get all account transactions with pagination', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
|
-
'create': { method: 'POST', path: '/v1/account-transactions', summary: 'Create a new account transaction', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
|
+
'create': { method: 'POST', path: '/v1/account-transactions', summary: 'Create a new account transaction', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['allocations'] },
|
|
13
13
|
'get': { method: 'GET', path: '/v1/account-transactions/{id}', summary: 'Get an account transaction by ID', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
14
|
-
'update': { method: 'PATCH', path: '/v1/account-transactions/{id}', summary: 'Update an account transaction', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
14
|
+
'update': { method: 'PATCH', path: '/v1/account-transactions/{id}', summary: 'Update an account transaction', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['allocations'] },
|
|
15
15
|
'delete': { method: 'DELETE', path: '/v1/account-transactions/{id}', summary: 'Delete an account transaction', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
16
16
|
'list-allocations': { method: 'GET', path: '/v1/account-transactions/{transactionId}/allocations', summary: 'Get all allocations for an account transaction', pathParams: ['transactionId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
17
17
|
'create-allocations': { method: 'POST', path: '/v1/account-transactions/{transactionId}/allocations', summary: 'Create an allocation for an account transaction', pathParams: ['transactionId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['notes'] },
|
|
@@ -8,9 +8,9 @@ const HAS_CAMT053 = false;
|
|
|
8
8
|
const NESTED_IMPORTS = [];
|
|
9
9
|
const SUBCOMMANDS = [...["list", "find-entity", "find-workflow"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
10
10
|
const ENDPOINTS = {
|
|
11
|
-
'list': { method: 'GET', path: '/v1/audit-
|
|
12
|
-
'find-entity': { method: 'GET', path: '/v1/audit-
|
|
13
|
-
'find-workflow': { method: 'GET', path: '/v1/audit-
|
|
11
|
+
'list': { method: 'GET', path: '/v1/audit-logs', summary: 'Get audit log entries', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
|
+
'find-entity': { method: 'GET', path: '/v1/audit-logs/entity/{entityId}', summary: 'Get audit history for a specific entity', pathParams: ['entityId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
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: [] },
|
|
14
14
|
};
|
|
15
15
|
export default class AuditLog extends Command {
|
|
16
16
|
static description = 'Manage audit log';
|
|
@@ -15,6 +15,7 @@ export default class BusinessPartners extends Command {
|
|
|
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
17
|
'note-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'business-partner-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
19
|
page: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
20
|
limit: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
21
|
include: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -5,19 +5,31 @@ import { getCurrentContext, getContext, getBaseUrls } from '../lib/config.js';
|
|
|
5
5
|
const HAS_IMPORT = true;
|
|
6
6
|
const HAS_EXPORT = true;
|
|
7
7
|
const HAS_CAMT053 = false;
|
|
8
|
-
const NESTED_IMPORTS = ["notes"];
|
|
9
|
-
const SUBCOMMANDS = [...["list", "create", "get", "update", "delete", "list-notes", "create-notes", "get-notes", "update-notes", "delete-notes"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
8
|
+
const NESTED_IMPORTS = ["notes", "contacts", "contacts-notes"];
|
|
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
12
|
'create': { method: 'POST', path: '/v1/business-partners', summary: 'Create a new business partner', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['invoiceEmailCc', 'contacts', 'tagIds', '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
14
|
'update': { method: 'PATCH', path: '/v1/business-partners/{id}', summary: 'Update a business partner', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['invoiceEmailCc', 'contacts', 'tagIds', '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
|
+
'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
|
+
'activate': { method: 'POST', path: '/v1/business-partners/{id}/activate', summary: 'Activate a business partner', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
16
18
|
'list-notes': { method: 'GET', path: '/v1/business-partners/{businessPartnerId}/notes', summary: 'Get all notes for a business partner', pathParams: ['businessPartnerId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
17
19
|
'create-notes': { method: 'POST', path: '/v1/business-partners/{businessPartnerId}/notes', summary: 'Create a note for a business partner', pathParams: ['businessPartnerId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
18
20
|
'get-notes': { method: 'GET', path: '/v1/business-partners/{businessPartnerId}/notes/{noteId}', summary: 'Get a specific note for a business partner', pathParams: ['businessPartnerId', 'noteId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
19
21
|
'update-notes': { method: 'PATCH', path: '/v1/business-partners/{businessPartnerId}/notes/{noteId}', summary: 'Update a note for a business partner', pathParams: ['businessPartnerId', 'noteId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
20
22
|
'delete-notes': { method: 'DELETE', path: '/v1/business-partners/{businessPartnerId}/notes/{noteId}', summary: 'Delete a note from a business partner', pathParams: ['businessPartnerId', 'noteId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
23
|
+
'list-contacts': { method: 'GET', path: '/v1/business-partners/{businessPartnerId}/contacts', summary: 'Get all contacts for a business partner with pagination', pathParams: ['businessPartnerId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
24
|
+
'create-contacts': { method: 'POST', path: '/v1/business-partners/{businessPartnerId}/contacts', summary: 'Create a new contact for a business partner', pathParams: ['businessPartnerId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['notes'] },
|
|
25
|
+
'get-contacts': { method: 'GET', path: '/v1/business-partners/{businessPartnerId}/contacts/{id}', summary: 'Get a contact by ID', pathParams: ['id', 'businessPartnerId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
26
|
+
'update-contacts': { method: 'PATCH', path: '/v1/business-partners/{businessPartnerId}/contacts/{id}', summary: 'Update a contact', pathParams: ['id', 'businessPartnerId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['notes'] },
|
|
27
|
+
'delete-contacts': { method: 'DELETE', path: '/v1/business-partners/{businessPartnerId}/contacts/{id}', summary: 'Delete a contact', pathParams: ['id', 'businessPartnerId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
28
|
+
'list-contacts-notes': { method: 'GET', path: '/v1/business-partners/contacts/{contactId}/notes', summary: 'Get all notes for a contact', pathParams: ['contactId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
29
|
+
'create-contacts-notes': { method: 'POST', path: '/v1/business-partners/contacts/{contactId}/notes', summary: 'Create a note for a contact', pathParams: ['contactId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
30
|
+
'get-contacts-notes': { method: 'GET', path: '/v1/business-partners/contacts/{contactId}/notes/{noteId}', summary: 'Get a specific note for a contact', pathParams: ['contactId', 'noteId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
31
|
+
'update-contacts-notes': { method: 'PATCH', path: '/v1/business-partners/contacts/{contactId}/notes/{noteId}', summary: 'Update a note for a contact', pathParams: ['contactId', 'noteId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
32
|
+
'delete-contacts-notes': { method: 'DELETE', path: '/v1/business-partners/contacts/{contactId}/notes/{noteId}', summary: 'Delete a note from a contact', pathParams: ['contactId', 'noteId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
21
33
|
};
|
|
22
34
|
export default class BusinessPartners extends Command {
|
|
23
35
|
static description = 'Manage business partners';
|
|
@@ -42,6 +54,7 @@ export default class BusinessPartners extends Command {
|
|
|
42
54
|
file: Flags.string({ char: 'f', description: 'Read request body from file' }),
|
|
43
55
|
set: Flags.string({ char: 's', description: 'Set individual field (e.g. --set firstName=John)', multiple: true }),
|
|
44
56
|
'note-id': Flags.string({ description: 'Path param: noteId' }),
|
|
57
|
+
'business-partner-id': Flags.string({ description: 'Path param: businessPartnerId' }),
|
|
45
58
|
page: Flags.string({ description: 'Page number' }),
|
|
46
59
|
limit: Flags.string({ description: 'Items per page' }),
|
|
47
60
|
include: Flags.string({ description: 'Relations to include' }),
|
|
@@ -14,6 +14,7 @@ export default class PaymentMethods extends Command {
|
|
|
14
14
|
data: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
15
|
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
16
|
set: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
id: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
18
|
page: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
19
|
limit: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
20
|
include: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -5,14 +5,19 @@ import { getCurrentContext, getContext, getBaseUrls } from '../lib/config.js';
|
|
|
5
5
|
const HAS_IMPORT = true;
|
|
6
6
|
const HAS_EXPORT = true;
|
|
7
7
|
const HAS_CAMT053 = false;
|
|
8
|
-
const NESTED_IMPORTS = [];
|
|
9
|
-
const SUBCOMMANDS = [...["list", "create", "get", "update", "delete"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
8
|
+
const NESTED_IMPORTS = ["ledger-mappings"];
|
|
9
|
+
const SUBCOMMANDS = [...["list", "create", "get", "update", "delete", "list-ledger-mappings", "create-ledger-mappings", "get-ledger-mappings", "update-ledger-mappings", "delete-ledger-mappings"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
10
10
|
const ENDPOINTS = {
|
|
11
11
|
'list': { method: 'GET', path: '/v1/payment-methods', summary: 'Get all payment methods with pagination', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
12
|
'create': { method: 'POST', path: '/v1/payment-methods', summary: 'Create a new payment method', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['alternativeBankAccountIds', 'alternativeCreditCardAccountIds'] },
|
|
13
13
|
'get': { method: 'GET', path: '/v1/payment-methods/{id}', summary: 'Get a payment method by ID', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
14
14
|
'update': { method: 'PATCH', path: '/v1/payment-methods/{id}', summary: 'Update a payment method', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['alternativeBankAccountIds', 'alternativeCreditCardAccountIds'] },
|
|
15
15
|
'delete': { method: 'DELETE', path: '/v1/payment-methods/{id}', summary: 'Delete a payment method', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
16
|
+
'list-ledger-mappings': { method: 'GET', path: '/v1/payment-methods/{paymentMethodId}/ledger-mappings', summary: 'List ledger mappings for a payment method', pathParams: ['paymentMethodId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
17
|
+
'create-ledger-mappings': { method: 'POST', path: '/v1/payment-methods/{paymentMethodId}/ledger-mappings', summary: 'Create payment method ledger mapping', pathParams: ['paymentMethodId'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
18
|
+
'get-ledger-mappings': { method: 'GET', path: '/v1/payment-methods/{paymentMethodId}/ledger-mappings/{id}', summary: 'Get payment method ledger mapping by ID', pathParams: ['paymentMethodId', 'id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
19
|
+
'update-ledger-mappings': { method: 'PATCH', path: '/v1/payment-methods/{paymentMethodId}/ledger-mappings/{id}', summary: 'Update payment method ledger mapping', pathParams: ['paymentMethodId', 'id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
20
|
+
'delete-ledger-mappings': { method: 'DELETE', path: '/v1/payment-methods/{paymentMethodId}/ledger-mappings/{id}', summary: 'Delete payment method ledger mapping', pathParams: ['paymentMethodId', 'id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
16
21
|
};
|
|
17
22
|
export default class PaymentMethods extends Command {
|
|
18
23
|
static description = 'Manage payment methods';
|
|
@@ -36,6 +41,7 @@ export default class PaymentMethods extends Command {
|
|
|
36
41
|
data: Flags.string({ char: 'd', description: 'JSON data for request body' }),
|
|
37
42
|
file: Flags.string({ char: 'f', description: 'Read request body from file' }),
|
|
38
43
|
set: Flags.string({ char: 's', description: 'Set individual field (e.g. --set firstName=John)', multiple: true }),
|
|
44
|
+
'id': Flags.string({ description: 'Path param: id' }),
|
|
39
45
|
page: Flags.string({ description: 'Page number' }),
|
|
40
46
|
limit: Flags.string({ description: 'Items per page' }),
|
|
41
47
|
include: Flags.string({ description: 'Relations to include' }),
|
|
@@ -5,18 +5,19 @@ import { getCurrentContext, getContext, getBaseUrls } from '../lib/config.js';
|
|
|
5
5
|
const HAS_IMPORT = false;
|
|
6
6
|
const HAS_EXPORT = false;
|
|
7
7
|
const HAS_CAMT053 = false;
|
|
8
|
-
const NESTED_IMPORTS = [
|
|
9
|
-
const SUBCOMMANDS = [...["
|
|
8
|
+
const NESTED_IMPORTS = [];
|
|
9
|
+
const SUBCOMMANDS = [...["get", "create", "delete"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
10
10
|
const ENDPOINTS = {
|
|
11
|
-
'
|
|
12
|
-
'create
|
|
13
|
-
'
|
|
14
|
-
'update-ledger-mappings': { method: 'PATCH', path: '/v1/payment-methods/{paymentMethodId}/ledger-mappings/{id}', summary: 'Update payment method ledger mapping', pathParams: ['paymentMethodId', 'id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
15
|
-
'delete-ledger-mappings': { method: 'DELETE', path: '/v1/payment-methods/{paymentMethodId}/ledger-mappings/{id}', summary: 'Delete payment method ledger mapping', pathParams: ['paymentMethodId', 'id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
11
|
+
'get': { method: 'GET', path: '/v1/saved-views', summary: 'List saved views for a page', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
|
+
'create': { method: 'POST', path: '/v1/saved-views', summary: 'Create a saved view', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
13
|
+
'delete': { method: 'DELETE', path: '/v1/saved-views/{id}', summary: 'Delete a saved view (creator only)', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
16
14
|
};
|
|
17
|
-
export default class
|
|
18
|
-
static description = 'Manage
|
|
19
|
-
static examples = [
|
|
15
|
+
export default class SavedViews extends Command {
|
|
16
|
+
static description = 'Manage saved views';
|
|
17
|
+
static examples = [
|
|
18
|
+
'<%= config.bin %> saved-views get <id>',
|
|
19
|
+
'<%= config.bin %> saved-views create --data \'{...}\'',
|
|
20
|
+
];
|
|
20
21
|
static args = {
|
|
21
22
|
action: Args.string({ description: 'Action: ' + SUBCOMMANDS.join(', '), required: true }),
|
|
22
23
|
id: Args.string({ description: 'Resource ID (for get, update, delete operations)', required: false }),
|
|
@@ -29,7 +30,6 @@ export default class PaymentMethodLedgerMappings 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 }),
|
|
32
|
-
'id': Flags.string({ description: 'Path param: id' }),
|
|
33
33
|
page: Flags.string({ description: 'Page number' }),
|
|
34
34
|
limit: Flags.string({ description: 'Items per page' }),
|
|
35
35
|
include: Flags.string({ description: 'Relations to include' }),
|
|
@@ -42,7 +42,7 @@ export default class PaymentMethodLedgerMappings extends Command {
|
|
|
42
42
|
'show-http-request': Flags.boolean({ description: 'Show HTTP request details (method, URL, body)' }),
|
|
43
43
|
};
|
|
44
44
|
async run() {
|
|
45
|
-
const { args, flags } = await this.parse(
|
|
45
|
+
const { args, flags } = await this.parse(SavedViews);
|
|
46
46
|
// Handle import action specially
|
|
47
47
|
if (args.action === 'import') {
|
|
48
48
|
if (!HAS_IMPORT)
|
|
@@ -83,7 +83,7 @@ export default class PaymentMethodLedgerMappings extends Command {
|
|
|
83
83
|
// First path param always comes from positional argument
|
|
84
84
|
value = args.id;
|
|
85
85
|
if (!value)
|
|
86
|
-
this.error('Missing required argument: id. Usage: aderis
|
|
86
|
+
this.error('Missing required argument: id. Usage: aderis saved-views <action> <id>');
|
|
87
87
|
}
|
|
88
88
|
else {
|
|
89
89
|
const flagName = param.replace(/\./g, '-').replace(/([A-Z])/g, '-$1').toLowerCase().replace(/^-/, '');
|
|
@@ -682,7 +682,7 @@ export default class PaymentMethodLedgerMappings extends Command {
|
|
|
682
682
|
}
|
|
683
683
|
async runNestedImport(suffix, parentId, flags) {
|
|
684
684
|
if (!parentId) {
|
|
685
|
-
this.error(`Missing required argument: id. Usage: aderis
|
|
685
|
+
this.error(`Missing required argument: id. Usage: aderis saved-views import-${suffix} <parent-id> --file data.json`);
|
|
686
686
|
}
|
|
687
687
|
const context = flags.context ? getContext(flags.context) : getCurrentContext();
|
|
688
688
|
if (!context)
|
|
@@ -6,27 +6,31 @@ const HAS_IMPORT = true;
|
|
|
6
6
|
const HAS_EXPORT = true;
|
|
7
7
|
const HAS_CAMT053 = false;
|
|
8
8
|
const NESTED_IMPORTS = [];
|
|
9
|
-
const SUBCOMMANDS = [...["list", "create", "preview", "get", "update", "regenerate", "replace", "fields-contributions", "fields-contributions-export"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
9
|
+
const SUBCOMMANDS = [...["list", "create", "preview", "get", "update", "delete", "regenerate", "replace", "fields-contributions", "fields-contributions-export", "approve", "mark-as-filed", "xml"], ...(HAS_IMPORT ? ['import'] : []), ...(HAS_EXPORT ? ['export'] : []), ...NESTED_IMPORTS.map(n => `import-${n}`)];
|
|
10
10
|
const ENDPOINTS = {
|
|
11
|
-
'list': { method: 'GET', path: '/v1/vat-
|
|
12
|
-
'create': { method: 'POST', path: '/v1/vat-
|
|
13
|
-
'preview': { method: 'GET', path: '/v1/vat-
|
|
14
|
-
'get': { method: 'GET', path: '/v1/vat-
|
|
15
|
-
'update': { method: 'PATCH', path: '/v1/vat-
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'fields-contributions
|
|
11
|
+
'list': { method: 'GET', path: '/v1/vat-declarations', summary: 'List VAT reports (paginated)', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
12
|
+
'create': { method: 'POST', path: '/v1/vat-declarations', summary: 'Create a VAT declaration report (always async-accepted)', pathParams: [], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
13
|
+
'preview': { method: 'GET', path: '/v1/vat-declarations/preview', summary: 'Preview the in-scope counts and late entries for a candidate period', pathParams: [], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
14
|
+
'get': { method: 'GET', path: '/v1/vat-declarations/{id}', summary: 'Get a VAT report by id (this is the polling endpoint for async generation)', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
15
|
+
'update': { method: 'PATCH', path: '/v1/vat-declarations/{id}', summary: 'Update manualAdjustments, submission type, or amount basis on a DRAFT report', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: ['manualAdjustments'] },
|
|
16
|
+
'delete': { method: 'DELETE', path: '/v1/vat-declarations/{id}', summary: 'Delete a VAT declaration that is still in DRAFT status', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
17
|
+
'regenerate': { method: 'POST', path: '/v1/vat-declarations/{id}/regenerate', summary: 'Re-run the full generation pipeline on a DRAFT report', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
18
|
+
'replace': { method: 'POST', path: '/v1/vat-declarations/{id}/replace', summary: 'Create a corrective DRAFT (Berichtigungsabrechnung) from a FILED report', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
19
|
+
'fields-contributions': { method: 'GET', path: '/v1/vat-declarations/{id}/fields/{fieldId}/contributions', summary: 'Drill into the contributions for a single Ziffer', pathParams: ['id', 'fieldId'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
20
|
+
'fields-contributions-export': { method: 'GET', path: '/v1/vat-declarations/{id}/fields/{fieldId}/contributions/export', summary: 'Export the drill-down result set as an Excel workbook', pathParams: ['id', 'fieldId'], hasBody: false, isMultipart: false, isBinaryResponse: true, bodyArrayFields: [] },
|
|
21
|
+
'approve': { method: 'POST', path: '/v1/vat-declarations/{id}/approve', summary: 'Approve a VAT report and produce the eCH-0217 XML submission file.', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
22
|
+
'mark-as-filed': { method: 'POST', path: '/v1/vat-declarations/{id}/mark-as-filed', summary: 'Record the ESTV filing reference for a FINALIZED VAT report.', pathParams: ['id'], hasBody: true, isMultipart: false, isBinaryResponse: false, bodyArrayFields: [] },
|
|
23
|
+
'xml': { method: 'GET', path: '/v1/vat-declarations/{id}/xml', summary: 'Download the eCH-0217 XML submission file for a FINALIZED or FILED VAT report.', pathParams: ['id'], hasBody: false, isMultipart: false, isBinaryResponse: true, bodyArrayFields: [] },
|
|
20
24
|
};
|
|
21
|
-
export default class
|
|
22
|
-
static description = 'Manage vat
|
|
25
|
+
export default class VatDeclarations extends Command {
|
|
26
|
+
static description = 'Manage vat declarations';
|
|
23
27
|
static examples = [
|
|
24
|
-
'<%= config.bin %> vat-
|
|
25
|
-
'<%= config.bin %> vat-
|
|
26
|
-
'<%= config.bin %> vat-
|
|
27
|
-
'<%= config.bin %> vat-
|
|
28
|
-
'<%= config.bin %> vat-
|
|
29
|
-
'<%= config.bin %> vat-
|
|
28
|
+
'<%= config.bin %> vat-declarations list',
|
|
29
|
+
'<%= config.bin %> vat-declarations get <id>',
|
|
30
|
+
'<%= config.bin %> vat-declarations create --data \'{...}\'',
|
|
31
|
+
'<%= config.bin %> vat-declarations update <id> --set field=value',
|
|
32
|
+
'<%= config.bin %> vat-declarations import --file data.json',
|
|
33
|
+
'<%= config.bin %> vat-declarations export --csv > vat-declarations.csv',
|
|
30
34
|
];
|
|
31
35
|
static args = {
|
|
32
36
|
action: Args.string({ description: 'Action: ' + SUBCOMMANDS.join(', '), required: true }),
|
|
@@ -53,7 +57,7 @@ export default class VatDeclaration extends Command {
|
|
|
53
57
|
'show-http-request': Flags.boolean({ description: 'Show HTTP request details (method, URL, body)' }),
|
|
54
58
|
};
|
|
55
59
|
async run() {
|
|
56
|
-
const { args, flags } = await this.parse(
|
|
60
|
+
const { args, flags } = await this.parse(VatDeclarations);
|
|
57
61
|
// Handle import action specially
|
|
58
62
|
if (args.action === 'import') {
|
|
59
63
|
if (!HAS_IMPORT)
|
|
@@ -94,7 +98,7 @@ export default class VatDeclaration extends Command {
|
|
|
94
98
|
// First path param always comes from positional argument
|
|
95
99
|
value = args.id;
|
|
96
100
|
if (!value)
|
|
97
|
-
this.error('Missing required argument: id. Usage: aderis vat-
|
|
101
|
+
this.error('Missing required argument: id. Usage: aderis vat-declarations <action> <id>');
|
|
98
102
|
}
|
|
99
103
|
else {
|
|
100
104
|
const flagName = param.replace(/\./g, '-').replace(/([A-Z])/g, '-$1').toLowerCase().replace(/^-/, '');
|
|
@@ -693,7 +697,7 @@ export default class VatDeclaration extends Command {
|
|
|
693
697
|
}
|
|
694
698
|
async runNestedImport(suffix, parentId, flags) {
|
|
695
699
|
if (!parentId) {
|
|
696
|
-
this.error(`Missing required argument: id. Usage: aderis vat-
|
|
700
|
+
this.error(`Missing required argument: id. Usage: aderis vat-declarations import-${suffix} <parent-id> --file data.json`);
|
|
697
701
|
}
|
|
698
702
|
const context = flags.context ? getContext(flags.context) : getCurrentContext();
|
|
699
703
|
if (!context)
|