@aderis-erp/cli 1.0.11 → 1.0.13

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.
Files changed (33) hide show
  1. package/dist/commands/{agent-runs.d.ts → agent-platform.d.ts} +2 -2
  2. package/dist/commands/agent-platform.js +1175 -0
  3. package/dist/commands/auth/login.js +2 -3
  4. package/dist/commands/business-partners.js +2 -2
  5. package/dist/commands/chat.d.ts +40 -0
  6. package/dist/commands/chat.js +1177 -0
  7. package/dist/commands/config/add.js +2 -3
  8. package/dist/commands/config/rename.d.ts +10 -0
  9. package/dist/commands/config/rename.js +68 -0
  10. package/dist/commands/delivery-notes.d.ts +43 -0
  11. package/dist/commands/delivery-notes.js +1204 -0
  12. package/dist/commands/dunning-configs.js +2 -2
  13. package/dist/commands/email-transactions.d.ts +40 -0
  14. package/dist/commands/{agent-runs.js → email-transactions.js} +12 -18
  15. package/dist/commands/inbox.js +3 -3
  16. package/dist/commands/payment-runs.js +1 -3
  17. package/dist/commands/payments.d.ts +40 -0
  18. package/dist/commands/payments.js +1180 -0
  19. package/dist/commands/purchase-orders.d.ts +2 -0
  20. package/dist/commands/purchase-orders.js +14 -4
  21. package/dist/commands/sales-invoices.js +11 -8
  22. package/dist/commands/sales-orders.js +8 -6
  23. package/dist/commands/schedules.d.ts +40 -0
  24. package/dist/commands/schedules.js +1182 -0
  25. package/dist/commands/tax-codes.js +2 -2
  26. package/dist/commands/tenants.js +5 -3
  27. package/dist/commands/vat-declarations.js +1 -1
  28. package/dist/commands/vendor-invoices.js +7 -5
  29. package/dist/lib/auth.js +2 -2
  30. package/dist/lib/config.d.ts +2 -1
  31. package/dist/lib/config.js +20 -5
  32. package/oclif.manifest.json +998 -108
  33. package/package.json +3 -2
@@ -17,8 +17,8 @@ export default class ConfigAdd extends Command {
17
17
  }),
18
18
  environment: Flags.string({
19
19
  char: 'e',
20
- description: 'Environment (dev, test, staging, live)',
21
- options: ['dev', 'test', 'staging', 'live'],
20
+ description: 'Environment (dev, staging, live)',
21
+ options: ['dev', 'staging', 'live'],
22
22
  }),
23
23
  force: Flags.boolean({
24
24
  char: 'f',
@@ -66,7 +66,6 @@ export default class ConfigAdd extends Command {
66
66
  choices: [
67
67
  { name: 'live (production)', value: 'live' },
68
68
  { name: 'staging', value: 'staging' },
69
- { name: 'test', value: 'test' },
70
69
  { name: 'dev (development)', value: 'dev' },
71
70
  ],
72
71
  message: 'Environment:',
@@ -0,0 +1,10 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class ConfigRename extends Command {
3
+ static args: {
4
+ oldName: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
5
+ newName: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
6
+ };
7
+ static description: string;
8
+ static examples: string[];
9
+ run(): Promise<void>;
10
+ }
@@ -0,0 +1,68 @@
1
+ import { input, select } from '@inquirer/prompts';
2
+ import { Args, Command } from '@oclif/core';
3
+ import { getContext, getCurrentContext, listContexts, renameContext } from '../../lib/config.js';
4
+ export default class ConfigRename extends Command {
5
+ static args = {
6
+ oldName: Args.string({
7
+ description: 'Current name of the context to rename',
8
+ required: false,
9
+ }),
10
+ newName: Args.string({
11
+ description: 'New name for the context',
12
+ required: false,
13
+ }),
14
+ };
15
+ static description = 'Rename a configured context';
16
+ static examples = [
17
+ '<%= config.bin %> config rename aderis-erp aderis-erp-dev',
18
+ '<%= config.bin %> config rename',
19
+ ];
20
+ async run() {
21
+ const { args } = await this.parse(ConfigRename);
22
+ let { oldName } = args;
23
+ if (!oldName) {
24
+ const contexts = listContexts();
25
+ if (contexts.length === 0) {
26
+ this.error('No contexts configured. Create one with: aderis auth login --new');
27
+ }
28
+ oldName = await select({
29
+ choices: contexts.map((c) => ({
30
+ name: `${c.name} (${c.environment})`,
31
+ value: c.name,
32
+ })),
33
+ message: 'Select a context to rename:',
34
+ });
35
+ }
36
+ if (!getContext(oldName)) {
37
+ this.error(`Context "${oldName}" not found.`);
38
+ }
39
+ let { newName } = args;
40
+ if (!newName) {
41
+ newName = await input({
42
+ message: `New name for "${oldName}":`,
43
+ validate: (value) => {
44
+ const trimmed = value.trim();
45
+ if (!trimmed)
46
+ return 'Name cannot be empty';
47
+ if (trimmed === oldName)
48
+ return 'New name must be different from the current name';
49
+ if (getContext(trimmed))
50
+ return `Context "${trimmed}" already exists`;
51
+ return true;
52
+ },
53
+ });
54
+ }
55
+ newName = newName.trim();
56
+ const wasCurrent = getCurrentContext()?.name === oldName;
57
+ try {
58
+ renameContext(oldName, newName);
59
+ }
60
+ catch (error) {
61
+ this.error(error instanceof Error ? error.message : String(error));
62
+ }
63
+ this.log(`Context "${oldName}" renamed to "${newName}".`);
64
+ if (wasCurrent) {
65
+ this.log(`"${newName}" is now your current context.`);
66
+ }
67
+ }
68
+ }
@@ -0,0 +1,43 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class DeliveryNotes extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ action: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
7
+ id: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
8
+ };
9
+ static flags: {
10
+ context: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ table: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
+ csv: import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
+ data: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ set: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ 'line-item-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ 'note-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ 'file-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ page: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
+ limit: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
22
+ include: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
23
+ search: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
24
+ 'sort-by': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
25
+ filter: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
26
+ query: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
27
+ fields: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
28
+ sanitize: import("@oclif/core/interfaces").BooleanFlag<boolean>;
29
+ 'show-http-request': import("@oclif/core/interfaces").BooleanFlag<boolean>;
30
+ };
31
+ run(): Promise<void>;
32
+ private runImport;
33
+ private runExport;
34
+ private runCamt053Import;
35
+ private runNestedImport;
36
+ private parseFilterValue;
37
+ private filterFields;
38
+ private sanitizeOutput;
39
+ private getColumns;
40
+ private getValue;
41
+ private printTable;
42
+ private printCsv;
43
+ }