@hisaabo/cli 0.4.0 → 0.6.1
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/.turbo/turbo-typecheck.log +1 -1
- package/dist/bin/{audit-trail-5LOCJ7XZ.js → audit-trail-4AMEFQGB.js} +1 -1
- package/dist/bin/{categories-64WWZTND.js → categories-CLCBRNWC.js} +1 -1
- package/dist/bin/{check-slug-FLHHUDYS.js → check-slug-OKW7KDYG.js} +1 -1
- package/dist/bin/{chunk-4MEL44QX.js → chunk-GXRLFDZW.js} +234 -0
- package/dist/bin/{client-5NZ23GML.js → client-2ZKMLWI6.js} +1 -1
- package/dist/bin/{collection-efficiency-U56XNVEE.js → collection-efficiency-TECE6PVQ.js} +1 -1
- package/dist/bin/{create-RPDEORDD.js → create-AS2YVGRA.js} +1 -1
- package/dist/bin/{default-account-AE6EXZZR.js → default-account-3RVSU7RF.js} +1 -1
- package/dist/bin/{expenses-5N2QSG54.js → expenses-KXFQJKD6.js} +1 -1
- package/dist/bin/{export-QICOQK34.js → export-UHZISG7H.js} +1 -1
- package/dist/bin/{factory-KOCW2AQM.js → factory-OBESY2LG.js} +1 -1
- package/dist/bin/{get-GWH6S5SJ.js → get-GTL556HL.js} +1 -1
- package/dist/bin/{get-A43QCI2S.js → get-WUSYEMG4.js} +1 -1
- package/dist/bin/hisaabo.js +893 -58
- package/dist/bin/{invitations-P3EEN5WI.js → invitations-U4ZNYWY7.js} +1 -1
- package/dist/bin/{invite-T3CKX53E.js → invite-5S4GJKRF.js} +1 -1
- package/dist/bin/{invoice-breakdown-FN5BEFJD.js → invoice-breakdown-PP3BZQLG.js} +1 -1
- package/dist/bin/{items-2OOCQKVF.js → items-CHEFLI7C.js} +1 -1
- package/dist/bin/{items-toggle-SKZWCGJH.js → items-toggle-ETVCDCU6.js} +1 -1
- package/dist/bin/{list-A2RKI3ZG.js → list-3FO4UJKC.js} +1 -1
- package/dist/bin/{list-NRMBMKMI.js → list-LQJGTZB4.js} +1 -1
- package/dist/bin/{list-T74SN6IR.js → list-RJ34MFPR.js} +1 -1
- package/dist/bin/{members-W2GW3ODT.js → members-TE5K5NQC.js} +1 -1
- package/dist/bin/{monthly-comparison-T34ZFOHL.js → monthly-comparison-Q6KPMTPS.js} +1 -1
- package/dist/bin/{order-cancel-TI27JYYD.js → order-cancel-NOQDBL2N.js} +1 -1
- package/dist/bin/{order-confirm-VMRAMNTD.js → order-confirm-6WMKTGPV.js} +1 -1
- package/dist/bin/{order-get-C2RBUR4O.js → order-get-ONWR4GTW.js} +1 -1
- package/dist/bin/{order-update-RE3HATNF.js → order-update-IVO4AFGV.js} +1 -1
- package/dist/bin/{payment-modes-WOOT22I7.js → payment-modes-FXB2G6WP.js} +1 -1
- package/dist/bin/{profit-loss-T4RESJ32.js → profit-loss-XPYELDTH.js} +1 -1
- package/dist/bin/{receivables-aging-6XMENEWS.js → receivables-aging-MU6Q3DZ4.js} +1 -1
- package/dist/bin/{remove-6QZI4JCY.js → remove-DJBOOOR4.js} +1 -1
- package/dist/bin/{revoke-AVEMPAC7.js → revoke-5L5GZ4ZZ.js} +1 -1
- package/dist/bin/{revoke-YUCFZFNR.js → revoke-WRIK7HLY.js} +1 -1
- package/dist/bin/{revoke-all-LFW5WBHO.js → revoke-all-QARW2G6R.js} +1 -1
- package/dist/bin/{revoke-invitation-DTGQRJR4.js → revoke-invitation-ZGLJHYNB.js} +1 -1
- package/dist/bin/{sales-trend-ZYBRUDUU.js → sales-trend-P5HOZJSX.js} +1 -1
- package/dist/bin/{sequence-FPOJTI2P.js → sequence-LK6QLSI5.js} +1 -1
- package/dist/bin/{store-IOB4Y67C.js → store-FU7CEILC.js} +1 -1
- package/dist/bin/{summary-5KYBA4ZO.js → summary-XONLN72I.js} +1 -1
- package/dist/bin/{top-customers-WSQ2UEJL.js → top-customers-U6HQW2GH.js} +1 -1
- package/dist/bin/{top-items-RWQPDGLN.js → top-items-EAOIVZ4P.js} +1 -1
- package/dist/bin/{top-outstanding-QAMO2E7Y.js → top-outstanding-4546FJDH.js} +1 -1
- package/dist/bin/{unpaid-invoices-WB3TK5B4.js → unpaid-invoices-AED55PLC.js} +1 -1
- package/dist/bin/{untracked-H733MYJL.js → untracked-ZEM2CDHC.js} +1 -1
- package/dist/bin/{update-TLBUIC5J.js → update-FO7AAXF5.js} +1 -1
- package/dist/bin/{update-H6LPO2Z4.js → update-OZPBIBME.js} +1 -1
- package/dist/bin/{update-JU2X3XU5.js → update-QCK32XAG.js} +1 -1
- package/dist/bin/{update-role-QST7BVFX.js → update-role-RB35QIA5.js} +1 -1
- package/dist/bin/{update-settings-Q2EGRLKZ.js → update-settings-EUC2FJQJ.js} +1 -1
- package/package.json +2 -2
- package/src/bin/hisaabo.ts +10 -0
- package/src/bin/registrars/bank-recon.ts +34 -0
- package/src/bin/registrars/einvoice.ts +46 -0
- package/src/bin/registrars/ewb.ts +37 -0
- package/src/bin/registrars/gst.ts +17 -1
- package/src/bin/registrars/itc.ts +56 -0
- package/src/bin/registrars/journal.ts +47 -0
- package/src/bin/registrars/report.ts +44 -0
- package/src/client.ts +249 -1
- package/src/commands/bank-recon/index.ts +127 -0
- package/src/commands/einvoice/index.ts +109 -0
- package/src/commands/ewb/index.ts +108 -0
- package/src/commands/gst/index.ts +79 -1
- package/src/commands/itc/index.ts +163 -0
- package/src/commands/journal/index.ts +156 -0
- package/src/commands/payment/create.ts +1 -3
- package/src/commands/report/index.ts +171 -0
package/package.json
CHANGED
package/src/bin/hisaabo.ts
CHANGED
|
@@ -21,6 +21,11 @@ import { registerDocumentCommands } from "./registrars/document.js";
|
|
|
21
21
|
import { registerTenantCommands } from "./registrars/tenant.js";
|
|
22
22
|
import { registerApiKeyCommands } from "./registrars/api-key.js";
|
|
23
23
|
import { registerSessionCommands } from "./registrars/session.js";
|
|
24
|
+
import { registerJournalCommands } from "./registrars/journal.js";
|
|
25
|
+
import { registerItcCommands } from "./registrars/itc.js";
|
|
26
|
+
import { registerBankReconCommands } from "./registrars/bank-recon.js";
|
|
27
|
+
import { registerEInvoiceCommands } from "./registrars/einvoice.js";
|
|
28
|
+
import { registerEwbCommands } from "./registrars/ewb.js";
|
|
24
29
|
|
|
25
30
|
// ── Program ───────────────────────────────────────────────────────────────
|
|
26
31
|
|
|
@@ -56,6 +61,11 @@ registerDocumentCommands(program);
|
|
|
56
61
|
registerTenantCommands(program);
|
|
57
62
|
registerApiKeyCommands(program);
|
|
58
63
|
registerSessionCommands(program);
|
|
64
|
+
registerJournalCommands(program);
|
|
65
|
+
registerItcCommands(program);
|
|
66
|
+
registerBankReconCommands(program);
|
|
67
|
+
registerEInvoiceCommands(program);
|
|
68
|
+
registerEwbCommands(program);
|
|
59
69
|
|
|
60
70
|
// ── Run ────────────────────────────────────────────────────────────────────
|
|
61
71
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import {
|
|
3
|
+
bankReconImportsCommand,
|
|
4
|
+
bankReconSummaryCommand,
|
|
5
|
+
bankReconRulesCommand,
|
|
6
|
+
} from "../../commands/bank-recon/index.js";
|
|
7
|
+
|
|
8
|
+
export function registerBankReconCommands(program: Command): void {
|
|
9
|
+
const bankRecon = program.command("bank-recon").description("Bank reconciliation");
|
|
10
|
+
|
|
11
|
+
bankRecon
|
|
12
|
+
.command("imports")
|
|
13
|
+
.description("List bank statement imports")
|
|
14
|
+
.option("--json", "JSON output")
|
|
15
|
+
.action(async (opts) => {
|
|
16
|
+
await bankReconImportsCommand({ json: opts.json });
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
bankRecon
|
|
20
|
+
.command("summary <importId>")
|
|
21
|
+
.description("Summary for a bank statement import")
|
|
22
|
+
.option("--json", "JSON output")
|
|
23
|
+
.action(async (importId: string, opts) => {
|
|
24
|
+
await bankReconSummaryCommand(importId, { json: opts.json });
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
bankRecon
|
|
28
|
+
.command("rules")
|
|
29
|
+
.description("List auto-matching rules")
|
|
30
|
+
.option("--json", "JSON output")
|
|
31
|
+
.action(async (opts) => {
|
|
32
|
+
await bankReconRulesCommand({ json: opts.json });
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import {
|
|
3
|
+
eInvoiceDashboardCommand,
|
|
4
|
+
eInvoiceGenerateCommand,
|
|
5
|
+
eInvoiceCancelCommand,
|
|
6
|
+
eInvoiceRetryCommand,
|
|
7
|
+
} from "../../commands/einvoice/index.js";
|
|
8
|
+
|
|
9
|
+
export function registerEInvoiceCommands(program: Command): void {
|
|
10
|
+
const einvoice = program.command("einvoice").description("E-Invoice (IRP) management");
|
|
11
|
+
|
|
12
|
+
einvoice
|
|
13
|
+
.command("dashboard")
|
|
14
|
+
.description("E-invoice generation summary")
|
|
15
|
+
.option("--json", "JSON output")
|
|
16
|
+
.option("--from <date>", "From date")
|
|
17
|
+
.option("--to <date>", "To date")
|
|
18
|
+
.action(async (opts) => {
|
|
19
|
+
await eInvoiceDashboardCommand(opts);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
einvoice
|
|
23
|
+
.command("generate <invoiceId>")
|
|
24
|
+
.description("Generate an e-invoice (get IRN from IRP)")
|
|
25
|
+
.option("--json", "JSON output")
|
|
26
|
+
.action(async (invoiceId: string, opts) => {
|
|
27
|
+
await eInvoiceGenerateCommand(invoiceId, { json: opts.json });
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
einvoice
|
|
31
|
+
.command("cancel <invoiceId>")
|
|
32
|
+
.description("Cancel an e-invoice")
|
|
33
|
+
.option("--json", "JSON output")
|
|
34
|
+
.option("--reason <code>", "Cancel reason code (1-4)")
|
|
35
|
+
.action(async (invoiceId: string, opts) => {
|
|
36
|
+
await eInvoiceCancelCommand(invoiceId, { json: opts.json, reason: opts.reason });
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
einvoice
|
|
40
|
+
.command("retry <invoiceId>")
|
|
41
|
+
.description("Retry a failed e-invoice generation")
|
|
42
|
+
.option("--json", "JSON output")
|
|
43
|
+
.action(async (invoiceId: string, opts) => {
|
|
44
|
+
await eInvoiceRetryCommand(invoiceId, { json: opts.json });
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import {
|
|
3
|
+
ewbDashboardCommand,
|
|
4
|
+
ewbGenerateCommand,
|
|
5
|
+
ewbExpiringCommand,
|
|
6
|
+
} from "../../commands/ewb/index.js";
|
|
7
|
+
|
|
8
|
+
export function registerEwbCommands(program: Command): void {
|
|
9
|
+
const ewb = program.command("ewb").description("E-Way Bill management");
|
|
10
|
+
|
|
11
|
+
ewb
|
|
12
|
+
.command("dashboard")
|
|
13
|
+
.description("E-way bill summary dashboard")
|
|
14
|
+
.option("--json", "JSON output")
|
|
15
|
+
.option("--from <date>", "From date")
|
|
16
|
+
.option("--to <date>", "To date")
|
|
17
|
+
.action(async (opts) => {
|
|
18
|
+
await ewbDashboardCommand(opts);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
ewb
|
|
22
|
+
.command("generate <invoiceId>")
|
|
23
|
+
.description("Generate an e-way bill for an invoice")
|
|
24
|
+
.option("--json", "JSON output")
|
|
25
|
+
.action(async (invoiceId: string, opts) => {
|
|
26
|
+
await ewbGenerateCommand(invoiceId, { json: opts.json });
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
ewb
|
|
30
|
+
.command("expiring")
|
|
31
|
+
.description("List e-way bills expiring soon")
|
|
32
|
+
.option("--json", "JSON output")
|
|
33
|
+
.option("--days <n>", "Within N days (default: 3)", parseInt)
|
|
34
|
+
.action(async (opts) => {
|
|
35
|
+
await ewbExpiringCommand({ json: opts.json, days: opts.days });
|
|
36
|
+
});
|
|
37
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { gstR1Command, gstR3bCommand, gstR1CsvCommand } from "../../commands/gst/index.js";
|
|
2
|
+
import { gstR1Command, gstR3bCommand, gstR1CsvCommand, gstR9Command, gstr2bUploadsCommand } from "../../commands/gst/index.js";
|
|
3
3
|
|
|
4
4
|
export function registerGstCommands(program: Command): void {
|
|
5
5
|
// ── gst ───────────────────────────────────────────────────────────────────
|
|
@@ -38,4 +38,20 @@ export function registerGstCommands(program: Command): void {
|
|
|
38
38
|
.action(async (opts) => {
|
|
39
39
|
await gstR1CsvCommand({ quarter: opts.quarter, month: opts.month, year: opts.year, output: opts.output });
|
|
40
40
|
});
|
|
41
|
+
|
|
42
|
+
gst
|
|
43
|
+
.command("gstr9 <fy>")
|
|
44
|
+
.description("GSTR-9 annual return (e.g. 2023-24)")
|
|
45
|
+
.option("--json", "JSON output")
|
|
46
|
+
.action(async (fy: string, opts) => {
|
|
47
|
+
await gstR9Command(fy, { json: opts.json });
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
gst
|
|
51
|
+
.command("gstr2b-uploads")
|
|
52
|
+
.description("List GSTR-2B uploaded periods")
|
|
53
|
+
.option("--json", "JSON output")
|
|
54
|
+
.action(async (opts) => {
|
|
55
|
+
await gstr2bUploadsCommand({ json: opts.json });
|
|
56
|
+
});
|
|
41
57
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import {
|
|
3
|
+
itcDashboardCommand,
|
|
4
|
+
itcLedgerCommand,
|
|
5
|
+
itcAgingCommand,
|
|
6
|
+
itcBlockCommand,
|
|
7
|
+
itcUnblockCommand,
|
|
8
|
+
} from "../../commands/itc/index.js";
|
|
9
|
+
|
|
10
|
+
export function registerItcCommands(program: Command): void {
|
|
11
|
+
const itc = program.command("itc").description("Input Tax Credit tracking");
|
|
12
|
+
|
|
13
|
+
itc
|
|
14
|
+
.command("dashboard")
|
|
15
|
+
.description("ITC summary dashboard")
|
|
16
|
+
.option("--json", "JSON output")
|
|
17
|
+
.option("--from <date>", "From date")
|
|
18
|
+
.option("--to <date>", "To date")
|
|
19
|
+
.action(async (opts) => {
|
|
20
|
+
await itcDashboardCommand(opts);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
itc
|
|
24
|
+
.command("ledger")
|
|
25
|
+
.description("ITC ledger — all eligible purchase credits")
|
|
26
|
+
.option("--json", "JSON output")
|
|
27
|
+
.option("--from <date>", "From date")
|
|
28
|
+
.option("--to <date>", "To date")
|
|
29
|
+
.action(async (opts) => {
|
|
30
|
+
await itcLedgerCommand(opts);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
itc
|
|
34
|
+
.command("aging")
|
|
35
|
+
.description("ITC aging alerts — credits at risk of reversal")
|
|
36
|
+
.option("--json", "JSON output")
|
|
37
|
+
.action(async (opts) => {
|
|
38
|
+
await itcAgingCommand({ json: opts.json });
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
itc
|
|
42
|
+
.command("block <invoiceId>")
|
|
43
|
+
.description("Mark ITC for an invoice as blocked")
|
|
44
|
+
.option("--json", "JSON output")
|
|
45
|
+
.action(async (invoiceId: string, opts) => {
|
|
46
|
+
await itcBlockCommand(invoiceId, { json: opts.json });
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
itc
|
|
50
|
+
.command("unblock <invoiceId>")
|
|
51
|
+
.description("Mark ITC for an invoice as eligible")
|
|
52
|
+
.option("--json", "JSON output")
|
|
53
|
+
.action(async (invoiceId: string, opts) => {
|
|
54
|
+
await itcUnblockCommand(invoiceId, { json: opts.json });
|
|
55
|
+
});
|
|
56
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import {
|
|
3
|
+
journalListCommand,
|
|
4
|
+
journalGetCommand,
|
|
5
|
+
journalVoidCommand,
|
|
6
|
+
journalTemplatesCommand,
|
|
7
|
+
} from "../../commands/journal/index.js";
|
|
8
|
+
|
|
9
|
+
export function registerJournalCommands(program: Command): void {
|
|
10
|
+
const journal = program.command("journal").description("Journal entries and templates");
|
|
11
|
+
|
|
12
|
+
journal
|
|
13
|
+
.command("list")
|
|
14
|
+
.description("List journal entries")
|
|
15
|
+
.option("--json", "JSON output")
|
|
16
|
+
.option("--page <n>", "Page number", parseInt)
|
|
17
|
+
.option("--limit <n>", "Results per page", parseInt)
|
|
18
|
+
.option("--from <date>", "From date")
|
|
19
|
+
.option("--to <date>", "To date")
|
|
20
|
+
.action(async (opts) => {
|
|
21
|
+
await journalListCommand(opts);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
journal
|
|
25
|
+
.command("get <id>")
|
|
26
|
+
.description("Get journal entry details")
|
|
27
|
+
.option("--json", "JSON output")
|
|
28
|
+
.action(async (id: string, opts) => {
|
|
29
|
+
await journalGetCommand(id, { json: opts.json });
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
journal
|
|
33
|
+
.command("void <id>")
|
|
34
|
+
.description("Void a journal entry")
|
|
35
|
+
.option("--json", "JSON output")
|
|
36
|
+
.action(async (id: string, opts) => {
|
|
37
|
+
await journalVoidCommand(id, { json: opts.json });
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
journal
|
|
41
|
+
.command("templates")
|
|
42
|
+
.description("List journal entry templates")
|
|
43
|
+
.option("--json", "JSON output")
|
|
44
|
+
.action(async (opts) => {
|
|
45
|
+
await journalTemplatesCommand({ json: opts.json });
|
|
46
|
+
});
|
|
47
|
+
}
|