@hisaabo/cli 0.6.1 → 0.8.4
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/LICENSE +31 -0
- package/README.md +9 -0
- package/dist/bin/{audit-trail-4AMEFQGB.js → audit-trail-IJ6SKACR.js} +3 -3
- package/dist/bin/{categories-CLCBRNWC.js → categories-O6TODPAH.js} +2 -2
- package/dist/bin/{check-slug-OKW7KDYG.js → check-slug-P7RFU6OP.js} +2 -2
- package/dist/bin/chunk-NO4FIFMS.js +0 -0
- package/dist/bin/{chunk-FIMJZAS4.js → chunk-QUITS2FE.js} +46 -1
- package/dist/bin/{chunk-GXRLFDZW.js → chunk-WDN7RIE3.js} +32 -2
- package/dist/bin/{chunk-T63VQXNM.js → chunk-ZPYC767N.js} +1 -0
- package/dist/bin/{client-2ZKMLWI6.js → client-36JX5MR3.js} +1 -1
- package/dist/bin/{collection-efficiency-TECE6PVQ.js → collection-efficiency-DA5RWG3V.js} +3 -3
- package/dist/bin/{config-335MN4I7.js → config-4LLNT4SH.js} +5 -1
- package/dist/bin/{create-AS2YVGRA.js → create-C5INBPQO.js} +2 -2
- package/dist/bin/{default-account-3RVSU7RF.js → default-account-2GMQ7ZA4.js} +2 -2
- package/dist/bin/{expenses-KXFQJKD6.js → expenses-S2YVA5UT.js} +3 -3
- package/dist/bin/{export-UHZISG7H.js → export-YOOODNVX.js} +2 -2
- package/dist/bin/export-ZA43MLWO.js +191 -0
- package/dist/bin/{factory-OBESY2LG.js → factory-6MUCSXTL.js} +3 -3
- package/dist/bin/{get-WUSYEMG4.js → get-GMQRROK2.js} +2 -2
- package/dist/bin/{get-GTL556HL.js → get-ZV3SC2VY.js} +3 -3
- package/dist/bin/hisaabo.js +107 -59
- package/dist/bin/import-UUHMLCKX.js +267 -0
- package/dist/bin/{invitations-U4ZNYWY7.js → invitations-OVORTTMF.js} +2 -2
- package/dist/bin/{invite-5S4GJKRF.js → invite-GGHBZY4U.js} +2 -2
- package/dist/bin/{invoice-breakdown-PP3BZQLG.js → invoice-breakdown-32XXAZDP.js} +3 -3
- package/dist/bin/{items-CHEFLI7C.js → items-6NOIMH6B.js} +3 -3
- package/dist/bin/{items-toggle-ETVCDCU6.js → items-toggle-L6W6QKQD.js} +2 -2
- package/dist/bin/{list-3FO4UJKC.js → list-FC5JHKHD.js} +3 -3
- package/dist/bin/{list-RJ34MFPR.js → list-OXAVDXH7.js} +2 -2
- package/dist/bin/{list-LQJGTZB4.js → list-RAR56EMQ.js} +2 -2
- package/dist/bin/{members-TE5K5NQC.js → members-Y6XJVHHR.js} +3 -3
- package/dist/bin/{monthly-comparison-Q6KPMTPS.js → monthly-comparison-IAUZ6SBJ.js} +3 -3
- package/dist/bin/{order-cancel-NOQDBL2N.js → order-cancel-QRTCNART.js} +2 -2
- package/dist/bin/{order-confirm-6WMKTGPV.js → order-confirm-LGQOMC4O.js} +2 -2
- package/dist/bin/{order-get-ONWR4GTW.js → order-get-4XAQCRYV.js} +3 -3
- package/dist/bin/{order-update-IVO4AFGV.js → order-update-KZY4H2UR.js} +3 -3
- package/dist/bin/output-NUOL7KJW.js +0 -0
- package/dist/bin/{payment-modes-FXB2G6WP.js → payment-modes-DY2ZEMK7.js} +3 -3
- package/dist/bin/{profit-loss-XPYELDTH.js → profit-loss-5GJBG3PL.js} +3 -3
- package/dist/bin/{receivables-aging-MU6Q3DZ4.js → receivables-aging-6A7XJKDT.js} +3 -3
- package/dist/bin/{remove-DJBOOOR4.js → remove-ZBX34TIQ.js} +2 -2
- package/dist/bin/{revoke-WRIK7HLY.js → revoke-XDNOA2GJ.js} +2 -2
- package/dist/bin/{revoke-5L5GZ4ZZ.js → revoke-ZTAMW2Q2.js} +2 -2
- package/dist/bin/{revoke-all-QARW2G6R.js → revoke-all-365NRBOA.js} +2 -2
- package/dist/bin/{revoke-invitation-ZGLJHYNB.js → revoke-invitation-PQH7XNYA.js} +2 -2
- package/dist/bin/{sales-trend-P5HOZJSX.js → sales-trend-D6PQ7MHY.js} +3 -3
- package/dist/bin/{sequence-LK6QLSI5.js → sequence-KZWADVD7.js} +2 -2
- package/dist/bin/{store-FU7CEILC.js → store-SVRZBUFO.js} +3 -3
- package/dist/bin/{summary-XONLN72I.js → summary-H6U7O5GJ.js} +3 -3
- package/dist/bin/{top-customers-U6HQW2GH.js → top-customers-ATBN6RDI.js} +3 -3
- package/dist/bin/{top-items-EAOIVZ4P.js → top-items-XXU6KYTC.js} +3 -3
- package/dist/bin/{top-outstanding-4546FJDH.js → top-outstanding-JTQNGGW4.js} +3 -3
- package/dist/bin/{unpaid-invoices-AED55PLC.js → unpaid-invoices-BTNQFWCH.js} +3 -3
- package/dist/bin/{untracked-ZEM2CDHC.js → untracked-PAMEDJ6Y.js} +3 -3
- package/dist/bin/{update-FO7AAXF5.js → update-6ZMX2OYX.js} +3 -3
- package/dist/bin/{update-OZPBIBME.js → update-EGHPFXLK.js} +2 -2
- package/dist/bin/{update-QCK32XAG.js → update-EK4NJWU4.js} +3 -3
- package/dist/bin/{update-role-RB35QIA5.js → update-role-24PDTNFK.js} +2 -2
- package/dist/bin/{update-settings-EUC2FJQJ.js → update-settings-AASI6WZX.js} +2 -2
- package/package.json +35 -9
- package/.turbo/turbo-build.log +0 -13
- package/.turbo/turbo-typecheck.log +0 -4
- package/CLI-UX-ARCHITECTURE.md +0 -1269
- package/src/auth.ts +0 -221
- package/src/bin/hisaabo.ts +0 -74
- package/src/bin/registrars/api-key.ts +0 -44
- package/src/bin/registrars/auth.ts +0 -222
- package/src/bin/registrars/automated-invoice.ts +0 -167
- package/src/bin/registrars/bank-recon.ts +0 -34
- package/src/bin/registrars/bank.ts +0 -124
- package/src/bin/registrars/business.ts +0 -120
- package/src/bin/registrars/dashboard.ts +0 -225
- package/src/bin/registrars/document.ts +0 -184
- package/src/bin/registrars/einvoice.ts +0 -46
- package/src/bin/registrars/ewb.ts +0 -37
- package/src/bin/registrars/expense.ts +0 -87
- package/src/bin/registrars/gst.ts +0 -57
- package/src/bin/registrars/import.ts +0 -49
- package/src/bin/registrars/invoice.ts +0 -117
- package/src/bin/registrars/itc.ts +0 -56
- package/src/bin/registrars/item.ts +0 -112
- package/src/bin/registrars/journal.ts +0 -47
- package/src/bin/registrars/party.ts +0 -81
- package/src/bin/registrars/payment.ts +0 -128
- package/src/bin/registrars/report.ts +0 -186
- package/src/bin/registrars/session.ts +0 -32
- package/src/bin/registrars/shipment.ts +0 -74
- package/src/bin/registrars/store.ts +0 -128
- package/src/bin/registrars/target.ts +0 -46
- package/src/bin/registrars/tenant.ts +0 -73
- package/src/client.ts +0 -2051
- package/src/commands/api-key/create.ts +0 -72
- package/src/commands/api-key/list.ts +0 -71
- package/src/commands/api-key/revoke.ts +0 -46
- package/src/commands/automated-invoice/create.ts +0 -85
- package/src/commands/automated-invoice/delete.ts +0 -42
- package/src/commands/automated-invoice/get.ts +0 -113
- package/src/commands/automated-invoice/history.ts +0 -65
- package/src/commands/automated-invoice/index.ts +0 -11
- package/src/commands/automated-invoice/list.ts +0 -91
- package/src/commands/automated-invoice/pause.ts +0 -29
- package/src/commands/automated-invoice/resume.ts +0 -29
- package/src/commands/automated-invoice/run-now.ts +0 -29
- package/src/commands/automated-invoice/suggestions.ts +0 -68
- package/src/commands/automated-invoice/update.ts +0 -54
- package/src/commands/automated-invoice/usage.ts +0 -68
- package/src/commands/bank/gateway-config.ts +0 -61
- package/src/commands/bank/index.ts +0 -244
- package/src/commands/bank/update-gateway.ts +0 -84
- package/src/commands/bank-recon/index.ts +0 -127
- package/src/commands/business/audit-trail.ts +0 -79
- package/src/commands/business/export.ts +0 -52
- package/src/commands/business/get.ts +0 -55
- package/src/commands/business/sequence.ts +0 -65
- package/src/commands/business/update.ts +0 -64
- package/src/commands/dashboard/collection-efficiency.ts +0 -164
- package/src/commands/dashboard/expenses.ts +0 -76
- package/src/commands/dashboard/invoice-breakdown.ts +0 -89
- package/src/commands/dashboard/monthly-comparison.ts +0 -193
- package/src/commands/dashboard/payment-modes.ts +0 -121
- package/src/commands/dashboard/profit-loss.ts +0 -146
- package/src/commands/dashboard/receivables-aging.ts +0 -169
- package/src/commands/dashboard/sales-trend.ts +0 -68
- package/src/commands/dashboard/summary.ts +0 -105
- package/src/commands/dashboard/top-customers.ts +0 -70
- package/src/commands/dashboard/top-items.ts +0 -74
- package/src/commands/dashboard/top-outstanding.ts +0 -61
- package/src/commands/dashboard.ts +0 -105
- package/src/commands/document/factory.ts +0 -590
- package/src/commands/einvoice/index.ts +0 -109
- package/src/commands/ewb/index.ts +0 -108
- package/src/commands/expense/categories.ts +0 -40
- package/src/commands/expense/create.ts +0 -51
- package/src/commands/expense/delete.ts +0 -45
- package/src/commands/expense/list.ts +0 -65
- package/src/commands/expense/update.ts +0 -58
- package/src/commands/gst/index.ts +0 -194
- package/src/commands/import/index.ts +0 -168
- package/src/commands/invoice/create.ts +0 -262
- package/src/commands/invoice/delete.ts +0 -44
- package/src/commands/invoice/get.ts +0 -105
- package/src/commands/invoice/list.ts +0 -126
- package/src/commands/invoice/pdf.ts +0 -75
- package/src/commands/invoice/status.ts +0 -41
- package/src/commands/itc/index.ts +0 -163
- package/src/commands/item/categories.ts +0 -40
- package/src/commands/item/create.ts +0 -98
- package/src/commands/item/delete.ts +0 -44
- package/src/commands/item/list.ts +0 -81
- package/src/commands/item/low-stock-count.ts +0 -32
- package/src/commands/item/merge.ts +0 -53
- package/src/commands/item/price-history.ts +0 -59
- package/src/commands/item/rename-unit.ts +0 -39
- package/src/commands/item/sales-stats.ts +0 -44
- package/src/commands/item/stock-history.ts +0 -70
- package/src/commands/item/stock.ts +0 -46
- package/src/commands/item/switch-base-unit.ts +0 -42
- package/src/commands/item/update.ts +0 -59
- package/src/commands/item/variants-create.ts +0 -58
- package/src/commands/item/variants-delete.ts +0 -47
- package/src/commands/item/variants-list.ts +0 -63
- package/src/commands/item/variants-update.ts +0 -61
- package/src/commands/journal/index.ts +0 -156
- package/src/commands/party/create.ts +0 -88
- package/src/commands/party/delete.ts +0 -44
- package/src/commands/party/get.ts +0 -42
- package/src/commands/party/ledger-report.ts +0 -81
- package/src/commands/party/ledger.ts +0 -63
- package/src/commands/party/list.ts +0 -69
- package/src/commands/party/merge.ts +0 -50
- package/src/commands/party/stats.ts +0 -40
- package/src/commands/party/top-items.ts +0 -57
- package/src/commands/party/update.ts +0 -65
- package/src/commands/payment/create.ts +0 -131
- package/src/commands/payment/default-account.ts +0 -56
- package/src/commands/payment/delete.ts +0 -46
- package/src/commands/payment/get.ts +0 -59
- package/src/commands/payment/list.ts +0 -66
- package/src/commands/payment/unpaid-invoices.ts +0 -69
- package/src/commands/payment/untracked.ts +0 -70
- package/src/commands/payment/update.ts +0 -54
- package/src/commands/report/index.ts +0 -736
- package/src/commands/session/list.ts +0 -91
- package/src/commands/session/revoke-all.ts +0 -20
- package/src/commands/session/revoke.ts +0 -32
- package/src/commands/shipment/index.ts +0 -170
- package/src/commands/store/check-slug.ts +0 -48
- package/src/commands/store/index.ts +0 -77
- package/src/commands/store/items-toggle.ts +0 -41
- package/src/commands/store/items.ts +0 -61
- package/src/commands/store/order-cancel.ts +0 -48
- package/src/commands/store/order-confirm.ts +0 -45
- package/src/commands/store/order-get.ts +0 -66
- package/src/commands/store/order-update.ts +0 -52
- package/src/commands/store/update-settings.ts +0 -52
- package/src/commands/target/index.ts +0 -118
- package/src/commands/tenant/invitations.ts +0 -62
- package/src/commands/tenant/invite.ts +0 -57
- package/src/commands/tenant/list.ts +0 -46
- package/src/commands/tenant/members.ts +0 -55
- package/src/commands/tenant/remove.ts +0 -47
- package/src/commands/tenant/revoke-invitation.ts +0 -32
- package/src/commands/tenant/update-role.ts +0 -41
- package/src/config.ts +0 -96
- package/src/error-handler.ts +0 -53
- package/src/format.ts +0 -180
- package/src/output.ts +0 -228
- package/src/spinner.ts +0 -39
- package/tsconfig.json +0 -22
- package/tsup.config.ts +0 -18
package/dist/bin/hisaabo.js
CHANGED
|
@@ -11,18 +11,18 @@ import {
|
|
|
11
11
|
monthStart,
|
|
12
12
|
quarterRange,
|
|
13
13
|
todayISO
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZPYC767N.js";
|
|
15
15
|
import {
|
|
16
16
|
HisaaboApiError,
|
|
17
17
|
HisaaboClient
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WDN7RIE3.js";
|
|
19
19
|
import {
|
|
20
20
|
clearConfig,
|
|
21
21
|
getConfig,
|
|
22
22
|
getConfigPath,
|
|
23
23
|
requireAuth,
|
|
24
24
|
setConfig
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-QUITS2FE.js";
|
|
26
26
|
import {
|
|
27
27
|
EXIT,
|
|
28
28
|
fatalError,
|
|
@@ -390,19 +390,19 @@ function registerAuthCommands(program2) {
|
|
|
390
390
|
function registerDashboardCommands(program2) {
|
|
391
391
|
const dash = program2.command("dashboard").alias("dash").description("Business dashboard & analytics");
|
|
392
392
|
dash.command("summary").description("Financial summary overview (FY to date)").option("--json", "JSON output").action(async (opts) => {
|
|
393
|
-
const { dashboardCommand } = await import("./summary-
|
|
393
|
+
const { dashboardCommand } = await import("./summary-H6U7O5GJ.js");
|
|
394
394
|
await dashboardCommand({ json: opts.json });
|
|
395
395
|
});
|
|
396
396
|
dash.command("sales-trend").description("Sales trend over time").option("--months <n>", "Number of months to show", (v) => parseInt(v, 10)).option("--from <date>", "Start date (YYYY-MM-DD)").option("--to <date>", "End date (YYYY-MM-DD)").option("--granularity <g>", "daily | weekly | monthly").option("--json", "JSON output").option("--format <format>", "table | tsv | csv").action(async (opts) => {
|
|
397
|
-
const { dashboardSalesTrendCommand } = await import("./sales-trend-
|
|
397
|
+
const { dashboardSalesTrendCommand } = await import("./sales-trend-D6PQ7MHY.js");
|
|
398
398
|
await dashboardSalesTrendCommand(opts);
|
|
399
399
|
});
|
|
400
400
|
dash.command("top-outstanding").description("Parties with highest outstanding balances").option("--limit <n>", "Max rows to show", (v) => parseInt(v, 10)).option("--json", "JSON output").option("--format <format>", "table | tsv | csv").action(async (opts) => {
|
|
401
|
-
const { dashboardTopOutstandingCommand } = await import("./top-outstanding-
|
|
401
|
+
const { dashboardTopOutstandingCommand } = await import("./top-outstanding-JTQNGGW4.js");
|
|
402
402
|
await dashboardTopOutstandingCommand(opts);
|
|
403
403
|
});
|
|
404
404
|
dash.command("top-customers").description("Top customers by revenue").option("--limit <n>", "Max rows to show", (v) => parseInt(v, 10)).option("--from <date>", "Start date (YYYY-MM-DD)").option("--to <date>", "End date (YYYY-MM-DD)").option("--this-month", "Filter to current calendar month").option("--this-fy", "Filter to current financial year").option("--json", "JSON output").option("--format <format>", "table | tsv | csv").action(async (opts) => {
|
|
405
|
-
const { dashboardTopCustomersCommand } = await import("./top-customers-
|
|
405
|
+
const { dashboardTopCustomersCommand } = await import("./top-customers-ATBN6RDI.js");
|
|
406
406
|
await dashboardTopCustomersCommand({
|
|
407
407
|
limit: opts.limit,
|
|
408
408
|
from: opts.from,
|
|
@@ -414,7 +414,7 @@ function registerDashboardCommands(program2) {
|
|
|
414
414
|
});
|
|
415
415
|
});
|
|
416
416
|
dash.command("top-items").description("Top selling items by revenue and quantity").option("--limit <n>", "Max rows to show", (v) => parseInt(v, 10)).option("--type <type>", "Item type filter (product | service)").option("--from <date>", "Start date (YYYY-MM-DD)").option("--to <date>", "End date (YYYY-MM-DD)").option("--this-month", "Filter to current calendar month").option("--this-fy", "Filter to current financial year").option("--json", "JSON output").option("--format <format>", "table | tsv | csv").action(async (opts) => {
|
|
417
|
-
const { dashboardTopItemsCommand } = await import("./top-items-
|
|
417
|
+
const { dashboardTopItemsCommand } = await import("./top-items-XXU6KYTC.js");
|
|
418
418
|
await dashboardTopItemsCommand({
|
|
419
419
|
limit: opts.limit,
|
|
420
420
|
type: opts.type,
|
|
@@ -427,7 +427,7 @@ function registerDashboardCommands(program2) {
|
|
|
427
427
|
});
|
|
428
428
|
});
|
|
429
429
|
const expensesCmd = dash.command("expenses").description("Expenses broken down by category").option("--from <date>", "Start date (YYYY-MM-DD)").option("--to <date>", "End date (YYYY-MM-DD)").option("--this-month", "Filter to current calendar month").option("--this-fy", "Filter to current financial year").option("--json", "JSON output").option("--format <format>", "table | tsv | csv").action(async (opts) => {
|
|
430
|
-
const { dashboardExpensesCommand } = await import("./expenses-
|
|
430
|
+
const { dashboardExpensesCommand } = await import("./expenses-S2YVA5UT.js");
|
|
431
431
|
await dashboardExpensesCommand({
|
|
432
432
|
from: opts.from,
|
|
433
433
|
to: opts.to,
|
|
@@ -439,7 +439,7 @@ function registerDashboardCommands(program2) {
|
|
|
439
439
|
});
|
|
440
440
|
expensesCmd.alias("expenses-by-category");
|
|
441
441
|
dash.command("invoice-breakdown").description("Invoice count and amounts by status").option("--from <date>", "Start date (YYYY-MM-DD)").option("--to <date>", "End date (YYYY-MM-DD)").option("--this-month", "Filter to current calendar month").option("--this-fy", "Filter to current financial year").option("--json", "JSON output").action(async (opts) => {
|
|
442
|
-
const { dashboardInvoiceBreakdownCommand } = await import("./invoice-breakdown-
|
|
442
|
+
const { dashboardInvoiceBreakdownCommand } = await import("./invoice-breakdown-32XXAZDP.js");
|
|
443
443
|
await dashboardInvoiceBreakdownCommand({
|
|
444
444
|
from: opts.from,
|
|
445
445
|
to: opts.to,
|
|
@@ -449,7 +449,7 @@ function registerDashboardCommands(program2) {
|
|
|
449
449
|
});
|
|
450
450
|
});
|
|
451
451
|
const plCmd = dash.command("profit-loss").description("Profit & Loss statement").option("--from <date>", "Start date (YYYY-MM-DD, default: FY start)").option("--to <date>", "End date (YYYY-MM-DD, default: today)").option("--this-month", "Scope to current calendar month").option("--this-fy", "Scope to current financial year").option("--json", "JSON output").action(async (opts) => {
|
|
452
|
-
const { dashboardProfitLossCommand } = await import("./profit-loss-
|
|
452
|
+
const { dashboardProfitLossCommand } = await import("./profit-loss-5GJBG3PL.js");
|
|
453
453
|
await dashboardProfitLossCommand({
|
|
454
454
|
from: opts.from,
|
|
455
455
|
to: opts.to,
|
|
@@ -460,11 +460,11 @@ function registerDashboardCommands(program2) {
|
|
|
460
460
|
});
|
|
461
461
|
plCmd.alias("pl");
|
|
462
462
|
dash.command("receivables-aging").description("Receivables aging buckets (current / 1-30 / 31-60 / 61-90 / 90+)").option("--json", "JSON output").option("--format <format>", "table | tsv | csv").action(async (opts) => {
|
|
463
|
-
const { dashboardReceivablesAgingCommand } = await import("./receivables-aging-
|
|
463
|
+
const { dashboardReceivablesAgingCommand } = await import("./receivables-aging-6A7XJKDT.js");
|
|
464
464
|
await dashboardReceivablesAgingCommand({ json: opts.json, format: opts.format });
|
|
465
465
|
});
|
|
466
466
|
dash.command("payment-modes").description("Payment mode breakdown (cash / UPI / bank transfer / etc.)").option("--from <date>", "Start date (YYYY-MM-DD)").option("--to <date>", "End date (YYYY-MM-DD)").option("--this-month", "Filter to current calendar month").option("--this-fy", "Filter to current financial year").option("--json", "JSON output").option("--format <format>", "table | tsv | csv").action(async (opts) => {
|
|
467
|
-
const { dashboardPaymentModesCommand } = await import("./payment-modes-
|
|
467
|
+
const { dashboardPaymentModesCommand } = await import("./payment-modes-DY2ZEMK7.js");
|
|
468
468
|
await dashboardPaymentModesCommand({
|
|
469
469
|
from: opts.from,
|
|
470
470
|
to: opts.to,
|
|
@@ -475,7 +475,7 @@ function registerDashboardCommands(program2) {
|
|
|
475
475
|
});
|
|
476
476
|
});
|
|
477
477
|
dash.command("collection-efficiency").description("Collection rate, DSO, and aging breakdown").option("--from <date>", "Start date (YYYY-MM-DD)").option("--to <date>", "End date (YYYY-MM-DD)").option("--this-month", "Filter to current calendar month").option("--this-fy", "Filter to current financial year").option("--json", "JSON output").option("--format <format>", "table | tsv | csv").action(async (opts) => {
|
|
478
|
-
const { dashboardCollectionEfficiencyCommand } = await import("./collection-efficiency-
|
|
478
|
+
const { dashboardCollectionEfficiencyCommand } = await import("./collection-efficiency-DA5RWG3V.js");
|
|
479
479
|
await dashboardCollectionEfficiencyCommand({
|
|
480
480
|
from: opts.from,
|
|
481
481
|
to: opts.to,
|
|
@@ -486,7 +486,7 @@ function registerDashboardCommands(program2) {
|
|
|
486
486
|
});
|
|
487
487
|
});
|
|
488
488
|
dash.command("monthly-comparison").description("Month-over-month comparison of sales, expenses, profit, and collections").option("--json", "JSON output").option("--format <format>", "table | tsv | csv").action(async (opts) => {
|
|
489
|
-
const { dashboardMonthlyComparisonCommand } = await import("./monthly-comparison-
|
|
489
|
+
const { dashboardMonthlyComparisonCommand } = await import("./monthly-comparison-IAUZ6SBJ.js");
|
|
490
490
|
await dashboardMonthlyComparisonCommand({ json: opts.json, format: opts.format });
|
|
491
491
|
});
|
|
492
492
|
}
|
|
@@ -670,7 +670,12 @@ async function invoiceGetCommand(id, opts) {
|
|
|
670
670
|
`);
|
|
671
671
|
line2(`Total:`, (hasColor() ? chalk.bold(formatAmount(inv.totalAmount)) : formatAmount(inv.totalAmount)).padStart(16));
|
|
672
672
|
line2(`Paid:`, formatAmount(inv.amountPaid).padStart(16));
|
|
673
|
-
|
|
673
|
+
if (inv.totalAdjusted && parseFloat(inv.totalAdjusted) > 0)
|
|
674
|
+
line2(`Adjusted:`, ("-" + formatAmount(inv.totalAdjusted)).padStart(16));
|
|
675
|
+
const balance = inv.totalAdjusted && parseFloat(inv.totalAdjusted) > 0 ? String(parseFloat(inv.totalAmount) - parseFloat(inv.amountPaid) - parseFloat(inv.totalAdjusted)) : inv.balanceDue;
|
|
676
|
+
line2(`Balance:`, formatAmount(balance).padStart(16));
|
|
677
|
+
if (inv.status === "adjusted")
|
|
678
|
+
line2(`(Settled via credit note / sales return)`);
|
|
674
679
|
if (inv.notes || inv.termsAndConditions) {
|
|
675
680
|
divider2();
|
|
676
681
|
if (inv.notes) line2(`Notes: ${inv.notes}`);
|
|
@@ -1813,11 +1818,11 @@ function registerPaymentCommands(program2) {
|
|
|
1813
1818
|
await paymentDeleteCommand(id, { yes: opts.yes, json: opts.json });
|
|
1814
1819
|
});
|
|
1815
1820
|
payment.command("get <id>").description("Get payment details").option("--json", "JSON output").action(async (id, opts) => {
|
|
1816
|
-
const { paymentGetCommand } = await import("./get-
|
|
1821
|
+
const { paymentGetCommand } = await import("./get-ZV3SC2VY.js");
|
|
1817
1822
|
await paymentGetCommand(id, { json: opts.json });
|
|
1818
1823
|
});
|
|
1819
1824
|
payment.command("update <id>").description("Update a payment").option("--amount <amount>", "New amount").option("--mode <mode>", "Payment mode: cash, upi, bank, cheque, other").option("--date <YYYY-MM-DD>", "Payment date").option("--reference <ref>", "Reference number (empty string to clear)").option("--notes <text>", "Notes (empty string to clear)").option("--json", "JSON output").action(async (id, opts) => {
|
|
1820
|
-
const { paymentUpdateCommand } = await import("./update-
|
|
1825
|
+
const { paymentUpdateCommand } = await import("./update-EK4NJWU4.js");
|
|
1821
1826
|
await paymentUpdateCommand(id, {
|
|
1822
1827
|
json: opts.json,
|
|
1823
1828
|
amount: opts.amount,
|
|
@@ -1828,11 +1833,11 @@ function registerPaymentCommands(program2) {
|
|
|
1828
1833
|
});
|
|
1829
1834
|
});
|
|
1830
1835
|
payment.command("unpaid-invoices <partyId>").description("List unpaid invoices for a party").option("--json", "JSON output").option("--format <format>", "Output format: table, tsv, csv").action(async (partyId, opts) => {
|
|
1831
|
-
const { paymentUnpaidInvoicesCommand } = await import("./unpaid-invoices-
|
|
1836
|
+
const { paymentUnpaidInvoicesCommand } = await import("./unpaid-invoices-BTNQFWCH.js");
|
|
1832
1837
|
await paymentUnpaidInvoicesCommand(partyId, { json: opts.json, format: opts.format });
|
|
1833
1838
|
});
|
|
1834
1839
|
payment.command("untracked").description("List payments not linked to a bank account").option("--page <n>", "Page number", parseInt).option("--limit <n>", "Items per page", parseInt).option("--json", "JSON output").option("--format <format>", "Output format: table, tsv, csv").action(async (opts) => {
|
|
1835
|
-
const { paymentUntrackedCommand } = await import("./untracked-
|
|
1840
|
+
const { paymentUntrackedCommand } = await import("./untracked-PAMEDJ6Y.js");
|
|
1836
1841
|
await paymentUntrackedCommand({
|
|
1837
1842
|
json: opts.json,
|
|
1838
1843
|
format: opts.format,
|
|
@@ -1841,7 +1846,7 @@ function registerPaymentCommands(program2) {
|
|
|
1841
1846
|
});
|
|
1842
1847
|
});
|
|
1843
1848
|
payment.command("default-account").description("Show recommended bank account for payments").option("--party-id <id>", "Party UUID to scope recommendation").option("--json", "JSON output").action(async (opts) => {
|
|
1844
|
-
const { paymentDefaultAccountCommand } = await import("./default-account-
|
|
1849
|
+
const { paymentDefaultAccountCommand } = await import("./default-account-2GMQ7ZA4.js");
|
|
1845
1850
|
await paymentDefaultAccountCommand({ json: opts.json, partyId: opts.partyId });
|
|
1846
1851
|
});
|
|
1847
1852
|
}
|
|
@@ -1980,7 +1985,7 @@ function registerExpenseCommands(program2) {
|
|
|
1980
1985
|
await expenseDeleteCommand(id, { yes: opts.yes, json: opts.json });
|
|
1981
1986
|
});
|
|
1982
1987
|
expense.command("update <id>").description("Update an expense").option("--amount <amount>", "New amount").option("--category <cat>", "Expense category").option("--date <YYYY-MM-DD>", "Expense date").option("--description <text>", "Description").option("--payment-mode <mode>", "Payment mode: cash, upi, bank, cheque, other").option("--reference <ref>", "Reference number").option("--json", "JSON output").action(async (id, opts) => {
|
|
1983
|
-
const { expenseUpdateCommand } = await import("./update-
|
|
1988
|
+
const { expenseUpdateCommand } = await import("./update-6ZMX2OYX.js");
|
|
1984
1989
|
await expenseUpdateCommand(id, {
|
|
1985
1990
|
json: opts.json,
|
|
1986
1991
|
amount: opts.amount,
|
|
@@ -1992,7 +1997,7 @@ function registerExpenseCommands(program2) {
|
|
|
1992
1997
|
});
|
|
1993
1998
|
});
|
|
1994
1999
|
expense.command("categories").description("List all expense categories").option("--json", "JSON output").action(async (opts) => {
|
|
1995
|
-
const { expenseCategoriesCommand } = await import("./categories-
|
|
2000
|
+
const { expenseCategoriesCommand } = await import("./categories-O6TODPAH.js");
|
|
1996
2001
|
await expenseCategoriesCommand({ json: opts.json });
|
|
1997
2002
|
});
|
|
1998
2003
|
}
|
|
@@ -3447,11 +3452,11 @@ function registerTargetCommands(program2) {
|
|
|
3447
3452
|
function registerStoreCommands(program2) {
|
|
3448
3453
|
const store = program2.command("store").description("Online store management");
|
|
3449
3454
|
store.command("settings").description("Show store settings").option("--json", "JSON output").action(async (opts) => {
|
|
3450
|
-
const { storeSettingsCommand } = await import("./store-
|
|
3455
|
+
const { storeSettingsCommand } = await import("./store-SVRZBUFO.js");
|
|
3451
3456
|
await storeSettingsCommand({ json: opts.json });
|
|
3452
3457
|
});
|
|
3453
3458
|
store.command("update-settings").description("Update store settings").option("--slug <slug>", "Store URL slug").option("--tagline <text>", "Store tagline / description").option("--enabled <bool>", "Enable or disable store (true/false)").option("--json", "JSON output").action(async (opts) => {
|
|
3454
|
-
const { storeUpdateSettingsCommand } = await import("./update-settings-
|
|
3459
|
+
const { storeUpdateSettingsCommand } = await import("./update-settings-AASI6WZX.js");
|
|
3455
3460
|
await storeUpdateSettingsCommand({
|
|
3456
3461
|
slug: opts.slug,
|
|
3457
3462
|
tagline: opts.tagline,
|
|
@@ -3460,11 +3465,11 @@ function registerStoreCommands(program2) {
|
|
|
3460
3465
|
});
|
|
3461
3466
|
});
|
|
3462
3467
|
store.command("items").description("List items available in the store").option("--json", "JSON output").option("--format <format>", "Output format: table, tsv, csv").action(async (opts) => {
|
|
3463
|
-
const { storeItemsCommand } = await import("./items-
|
|
3468
|
+
const { storeItemsCommand } = await import("./items-6NOIMH6B.js");
|
|
3464
3469
|
await storeItemsCommand({ json: opts.json, format: opts.format });
|
|
3465
3470
|
});
|
|
3466
3471
|
store.command("items-toggle").description("Bulk enable / disable store items").option("--enable <ids>", "Comma-separated item IDs to enable").option("--disable <ids>", "Comma-separated item IDs to disable").option("--json", "JSON output").action(async (opts) => {
|
|
3467
|
-
const { storeItemsToggleCommand } = await import("./items-toggle-
|
|
3472
|
+
const { storeItemsToggleCommand } = await import("./items-toggle-L6W6QKQD.js");
|
|
3468
3473
|
await storeItemsToggleCommand({
|
|
3469
3474
|
enable: opts.enable,
|
|
3470
3475
|
disable: opts.disable,
|
|
@@ -3472,7 +3477,7 @@ function registerStoreCommands(program2) {
|
|
|
3472
3477
|
});
|
|
3473
3478
|
});
|
|
3474
3479
|
store.command("orders").description("List store orders").option("--json", "JSON output").option("--status <status>", "Filter by order status").option("--page <n>", "Page number", parseInt).option("--limit <n>", "Items per page", parseInt).action(async (opts) => {
|
|
3475
|
-
const { storeOrdersCommand } = await import("./store-
|
|
3480
|
+
const { storeOrdersCommand } = await import("./store-SVRZBUFO.js");
|
|
3476
3481
|
await storeOrdersCommand({
|
|
3477
3482
|
json: opts.json,
|
|
3478
3483
|
status: opts.status,
|
|
@@ -3481,15 +3486,15 @@ function registerStoreCommands(program2) {
|
|
|
3481
3486
|
});
|
|
3482
3487
|
});
|
|
3483
3488
|
store.command("order-get <id>").description("Get order details").option("--json", "JSON output").action(async (id, opts) => {
|
|
3484
|
-
const { storeOrderGetCommand } = await import("./order-get-
|
|
3489
|
+
const { storeOrderGetCommand } = await import("./order-get-4XAQCRYV.js");
|
|
3485
3490
|
await storeOrderGetCommand(id, { json: opts.json });
|
|
3486
3491
|
});
|
|
3487
3492
|
store.command("order-confirm <id>").description("Confirm a pending order").option("-y, --yes", "Skip confirmation prompt").option("--json", "JSON output").action(async (id, opts) => {
|
|
3488
|
-
const { storeOrderConfirmCommand } = await import("./order-confirm-
|
|
3493
|
+
const { storeOrderConfirmCommand } = await import("./order-confirm-LGQOMC4O.js");
|
|
3489
3494
|
await storeOrderConfirmCommand(id, { json: opts.json, yes: opts.yes });
|
|
3490
3495
|
});
|
|
3491
3496
|
store.command("order-cancel <id>").description("Cancel an order").option("-y, --yes", "Skip confirmation prompt").option("--reason <text>", "Cancellation reason").option("--json", "JSON output").action(async (id, opts) => {
|
|
3492
|
-
const { storeOrderCancelCommand } = await import("./order-cancel-
|
|
3497
|
+
const { storeOrderCancelCommand } = await import("./order-cancel-QRTCNART.js");
|
|
3493
3498
|
await storeOrderCancelCommand(id, {
|
|
3494
3499
|
json: opts.json,
|
|
3495
3500
|
yes: opts.yes,
|
|
@@ -3497,11 +3502,11 @@ function registerStoreCommands(program2) {
|
|
|
3497
3502
|
});
|
|
3498
3503
|
});
|
|
3499
3504
|
store.command("order-update <id>").description("Update order status").option("--status <status>", "New status: preparing, ready, delivered").option("--json", "JSON output").action(async (id, opts) => {
|
|
3500
|
-
const { storeOrderUpdateCommand } = await import("./order-update-
|
|
3505
|
+
const { storeOrderUpdateCommand } = await import("./order-update-KZY4H2UR.js");
|
|
3501
3506
|
await storeOrderUpdateCommand(id, { json: opts.json, status: opts.status });
|
|
3502
3507
|
});
|
|
3503
3508
|
store.command("check-slug <slug>").description("Check store slug availability").option("--json", "JSON output").action(async (slug, opts) => {
|
|
3504
|
-
const { storeCheckSlugCommand } = await import("./check-slug-
|
|
3509
|
+
const { storeCheckSlugCommand } = await import("./check-slug-P7RFU6OP.js");
|
|
3505
3510
|
await storeCheckSlugCommand(slug, { json: opts.json });
|
|
3506
3511
|
});
|
|
3507
3512
|
}
|
|
@@ -4268,23 +4273,23 @@ function registerBusinessCommands(program2) {
|
|
|
4268
4273
|
}
|
|
4269
4274
|
});
|
|
4270
4275
|
business.command("get").description("Show current business details").option("--json", "JSON output").action(async (opts) => {
|
|
4271
|
-
const { businessGetCommand } = await import("./get-
|
|
4276
|
+
const { businessGetCommand } = await import("./get-GMQRROK2.js");
|
|
4272
4277
|
await businessGetCommand(opts);
|
|
4273
4278
|
});
|
|
4274
4279
|
business.command("update").description("Update business settings").option("--name <name>", "Business name").option("--gstin <gstin>", "GSTIN").option("--address <address>", "Address").option("--state <state>", "State").option("--phone <phone>", "Phone number").option("--email <email>", "Email address").option("--financial-year-start <month>", "Financial year start month (1\u201312)").option("--json", "JSON output").action(async (opts) => {
|
|
4275
|
-
const { businessUpdateCommand } = await import("./update-
|
|
4280
|
+
const { businessUpdateCommand } = await import("./update-EGHPFXLK.js");
|
|
4276
4281
|
await businessUpdateCommand(opts);
|
|
4277
4282
|
});
|
|
4278
4283
|
business.command("sequence").description("Update invoice sequence number / prefix").requiredOption("--type <type>", "Document type: sale or purchase").option("--prefix <prefix>", "Invoice prefix (e.g. INV-)").option("--next-number <n>", "Next sequence number").option("--json", "JSON output").action(async (opts) => {
|
|
4279
|
-
const { businessSequenceCommand } = await import("./sequence-
|
|
4284
|
+
const { businessSequenceCommand } = await import("./sequence-KZWADVD7.js");
|
|
4280
4285
|
await businessSequenceCommand(opts);
|
|
4281
4286
|
});
|
|
4282
4287
|
business.command("audit-trail").description("View audit log for this business").option("--page <n>", "Page number", "1").option("--limit <n>", "Results per page", "25").option("--json", "JSON output").option("--format <fmt>", "Output format: table, tsv, csv").action(async (opts) => {
|
|
4283
|
-
const { businessAuditTrailCommand } = await import("./audit-trail-
|
|
4288
|
+
const { businessAuditTrailCommand } = await import("./audit-trail-IJ6SKACR.js");
|
|
4284
4289
|
await businessAuditTrailCommand(opts);
|
|
4285
4290
|
});
|
|
4286
4291
|
business.command("export").description("Export all business data").option("--yes", "Skip confirmation prompt").option("--json", "JSON output").action(async (opts) => {
|
|
4287
|
-
const { businessExportCommand } = await import("./export-
|
|
4292
|
+
const { businessExportCommand } = await import("./export-YOOODNVX.js");
|
|
4288
4293
|
await businessExportCommand(opts);
|
|
4289
4294
|
});
|
|
4290
4295
|
business.command("switch").description("Switch active business").option("--json", "JSON output").action(async (opts) => {
|
|
@@ -4366,29 +4371,29 @@ function registerDocumentCommands(program2) {
|
|
|
4366
4371
|
for (const dt of DOC_TYPES) {
|
|
4367
4372
|
const parent = program2.command(dt.cmd).description(`${dt.label} management`);
|
|
4368
4373
|
parent.command("list").description(`List ${dt.label.toLowerCase()}s`).option("--json", "JSON output").option("--format <format>", "Output format: table, tsv, csv, ids").option("--status <status>", `Filter by status: ${dt.statuses.join(", ")}`).option("--party <search>", "Filter by party name").option("--from <date>", "Start date (YYYY-MM-DD)").option("--to <date>", "End date (YYYY-MM-DD)").option("--this-month", "Current month").option("--this-fy", "Current financial year").option("--page <n>", "Page number", parseInt).option("--limit <n>", "Items per page", parseInt).action(async (opts) => {
|
|
4369
|
-
const { docListCommand } = await import("./factory-
|
|
4374
|
+
const { docListCommand } = await import("./factory-6MUCSXTL.js");
|
|
4370
4375
|
await docListCommand(dt, opts);
|
|
4371
4376
|
});
|
|
4372
4377
|
parent.command("get <id>").description(`Get ${dt.label.toLowerCase()} details`).option("--json", "JSON output").action(async (id, opts) => {
|
|
4373
|
-
const { docGetCommand } = await import("./factory-
|
|
4378
|
+
const { docGetCommand } = await import("./factory-6MUCSXTL.js");
|
|
4374
4379
|
await docGetCommand(dt, id, opts);
|
|
4375
4380
|
});
|
|
4376
4381
|
parent.command("create").description(`Create a new ${dt.label.toLowerCase()}`).option("--json", "JSON output").option("--party-id <id>", "Party UUID").option("--party <name>", "Party search name").option("--date <date>", "Document date (YYYY-MM-DD)").option("--due-date <date>", "Due date (YYYY-MM-DD)").option("--item <desc>", "Item description (repeatable)", (v, a) => [...a, v], []).option("--qty <n>", "Quantity per item (repeatable)", (v, a) => [...a, v], []).option("--rate <n>", "Rate per item (repeatable)", (v, a) => [...a, v], []).option("--notes <text>", "Notes").option("--discount <pct>", "Discount percent").option("-y, --yes", "Skip confirmation").action(async (opts) => {
|
|
4377
|
-
const { docCreateCommand } = await import("./factory-
|
|
4382
|
+
const { docCreateCommand } = await import("./factory-6MUCSXTL.js");
|
|
4378
4383
|
await docCreateCommand(dt, opts);
|
|
4379
4384
|
});
|
|
4380
4385
|
parent.command("update-status <id> <status>").description(`Update ${dt.label.toLowerCase()} status (${dt.statuses.join(", ")})`).option("--json", "JSON output").action(async (id, status, opts) => {
|
|
4381
|
-
const { docStatusCommand } = await import("./factory-
|
|
4386
|
+
const { docStatusCommand } = await import("./factory-6MUCSXTL.js");
|
|
4382
4387
|
await docStatusCommand(dt, id, status, opts);
|
|
4383
4388
|
});
|
|
4384
4389
|
parent.command("delete <id>").description(`Delete a ${dt.label.toLowerCase()}`).option("-y, --yes", "Skip confirmation").option("--json", "JSON output").action(async (id, opts) => {
|
|
4385
|
-
const { docDeleteCommand } = await import("./factory-
|
|
4390
|
+
const { docDeleteCommand } = await import("./factory-6MUCSXTL.js");
|
|
4386
4391
|
await docDeleteCommand(dt, id, opts);
|
|
4387
4392
|
});
|
|
4388
4393
|
}
|
|
4389
4394
|
program2.command("document").description("Document conversion operations").command("convert").description("Convert one document type to another").requiredOption("--from-type <type>", "Source type (quotation, proforma, delivery-challan, etc.)").requiredOption("--from-id <id>", "Source document ID").requiredOption("--to-type <type>", "Target type (invoice, credit-note, etc.)").option("--json", "JSON output").option("-y, --yes", "Skip confirmation").action(async (opts) => {
|
|
4390
|
-
const { HisaaboClient: HisaaboClient2, HisaaboApiError: HisaaboApiError2 } = await import("./client-
|
|
4391
|
-
const { requireAuth: requireAuth2 } = await import("./config-
|
|
4395
|
+
const { HisaaboClient: HisaaboClient2, HisaaboApiError: HisaaboApiError2 } = await import("./client-36JX5MR3.js");
|
|
4396
|
+
const { requireAuth: requireAuth2 } = await import("./config-4LLNT4SH.js");
|
|
4392
4397
|
const { fatalError: fatalError2, outputJSON: outputJSON2, success: success2, EXIT: EXIT2 } = await import("./output-NUOL7KJW.js");
|
|
4393
4398
|
const cfg = requireAuth2();
|
|
4394
4399
|
const client = new HisaaboClient2(cfg);
|
|
@@ -4440,31 +4445,31 @@ function registerDocumentCommands(program2) {
|
|
|
4440
4445
|
function registerTenantCommands(program2) {
|
|
4441
4446
|
const tenant = program2.command("tenant").description("Tenant / workspace management");
|
|
4442
4447
|
tenant.command("list").description("List tenants / organizations you belong to").option("--json", "JSON output").action(async (opts) => {
|
|
4443
|
-
const { tenantListCommand } = await import("./list-
|
|
4448
|
+
const { tenantListCommand } = await import("./list-OXAVDXH7.js");
|
|
4444
4449
|
await tenantListCommand({ json: opts.json });
|
|
4445
4450
|
});
|
|
4446
4451
|
tenant.command("members").description("List members of the current tenant").option("--json", "JSON output").option("--format <format>", "Output format: table, tsv, csv").action(async (opts) => {
|
|
4447
|
-
const { tenantMembersCommand } = await import("./members-
|
|
4452
|
+
const { tenantMembersCommand } = await import("./members-Y6XJVHHR.js");
|
|
4448
4453
|
await tenantMembersCommand({ json: opts.json, format: opts.format });
|
|
4449
4454
|
});
|
|
4450
4455
|
tenant.command("invite <email>").description("Invite a user to the tenant").option("--role <role>", "Role: admin, seller_manager, seller, accountant (default: seller)").option("--json", "JSON output").action(async (email, opts) => {
|
|
4451
|
-
const { tenantInviteCommand } = await import("./invite-
|
|
4456
|
+
const { tenantInviteCommand } = await import("./invite-GGHBZY4U.js");
|
|
4452
4457
|
await tenantInviteCommand(email, { role: opts.role, json: opts.json });
|
|
4453
4458
|
});
|
|
4454
4459
|
tenant.command("remove <userId>").description("Remove a member from the tenant").option("-y, --yes", "Skip confirmation").option("--json", "JSON output").action(async (userId, opts) => {
|
|
4455
|
-
const { tenantRemoveCommand } = await import("./remove-
|
|
4460
|
+
const { tenantRemoveCommand } = await import("./remove-ZBX34TIQ.js");
|
|
4456
4461
|
await tenantRemoveCommand(userId, { yes: opts.yes, json: opts.json });
|
|
4457
4462
|
});
|
|
4458
4463
|
tenant.command("update-role <userId> <role>").description("Update a member's role (admin, seller_manager, seller, accountant)").option("--json", "JSON output").action(async (userId, role, opts) => {
|
|
4459
|
-
const { tenantUpdateRoleCommand } = await import("./update-role-
|
|
4464
|
+
const { tenantUpdateRoleCommand } = await import("./update-role-24PDTNFK.js");
|
|
4460
4465
|
await tenantUpdateRoleCommand(userId, role, { json: opts.json });
|
|
4461
4466
|
});
|
|
4462
4467
|
tenant.command("invitations").description("List pending invitations").option("--json", "JSON output").action(async (opts) => {
|
|
4463
|
-
const { listInvitationsCommand } = await import("./invitations-
|
|
4468
|
+
const { listInvitationsCommand } = await import("./invitations-OVORTTMF.js");
|
|
4464
4469
|
await listInvitationsCommand(opts);
|
|
4465
4470
|
});
|
|
4466
4471
|
tenant.command("revoke-invitation <invitationId>").description("Revoke a pending invitation").option("--json", "JSON output").action(async (invitationId, opts) => {
|
|
4467
|
-
const { revokeInvitationCommand } = await import("./revoke-invitation-
|
|
4472
|
+
const { revokeInvitationCommand } = await import("./revoke-invitation-PQH7XNYA.js");
|
|
4468
4473
|
await revokeInvitationCommand(invitationId, opts);
|
|
4469
4474
|
});
|
|
4470
4475
|
}
|
|
@@ -4473,15 +4478,15 @@ function registerTenantCommands(program2) {
|
|
|
4473
4478
|
function registerApiKeyCommands(program2) {
|
|
4474
4479
|
const apiKey = program2.command("api-key").alias("key").description("API key management");
|
|
4475
4480
|
apiKey.command("list").description("List all API keys").option("--json", "JSON output").option("--format <fmt>", "Output format: table, tsv, csv").action(async (opts) => {
|
|
4476
|
-
const { apiKeyListCommand } = await import("./list-
|
|
4481
|
+
const { apiKeyListCommand } = await import("./list-FC5JHKHD.js");
|
|
4477
4482
|
await apiKeyListCommand(opts);
|
|
4478
4483
|
});
|
|
4479
4484
|
apiKey.command("create").description("Create a new API key").requiredOption("--name <name>", "Name / label for this key").option("--json", "JSON output").action(async (opts) => {
|
|
4480
|
-
const { apiKeyCreateCommand } = await import("./create-
|
|
4485
|
+
const { apiKeyCreateCommand } = await import("./create-C5INBPQO.js");
|
|
4481
4486
|
await apiKeyCreateCommand(opts);
|
|
4482
4487
|
});
|
|
4483
4488
|
apiKey.command("revoke <id>").description("Revoke an API key by ID").option("--yes", "Skip confirmation prompt").option("--json", "JSON output").action(async (id, opts) => {
|
|
4484
|
-
const { apiKeyRevokeCommand } = await import("./revoke-
|
|
4489
|
+
const { apiKeyRevokeCommand } = await import("./revoke-XDNOA2GJ.js");
|
|
4485
4490
|
await apiKeyRevokeCommand(id, opts);
|
|
4486
4491
|
});
|
|
4487
4492
|
}
|
|
@@ -4490,15 +4495,15 @@ function registerApiKeyCommands(program2) {
|
|
|
4490
4495
|
function registerSessionCommands(program2) {
|
|
4491
4496
|
const session = program2.command("session").description("Manage active sessions");
|
|
4492
4497
|
session.command("list").description("List active sessions").option("--expired", "Show expired sessions instead").option("--json", "JSON output").action(async (opts) => {
|
|
4493
|
-
const { listSessionsCommand } = await import("./list-
|
|
4498
|
+
const { listSessionsCommand } = await import("./list-RAR56EMQ.js");
|
|
4494
4499
|
await listSessionsCommand(opts);
|
|
4495
4500
|
});
|
|
4496
4501
|
session.command("revoke <sessionId>").description("Revoke a specific session").option("--json", "JSON output").action(async (sessionId, opts) => {
|
|
4497
|
-
const { revokeSessionCommand } = await import("./revoke-
|
|
4502
|
+
const { revokeSessionCommand } = await import("./revoke-ZTAMW2Q2.js");
|
|
4498
4503
|
await revokeSessionCommand(sessionId, opts);
|
|
4499
4504
|
});
|
|
4500
4505
|
session.command("revoke-all").description("Sign out from all devices").action(async () => {
|
|
4501
|
-
const { revokeAllSessionsCommand } = await import("./revoke-all-
|
|
4506
|
+
const { revokeAllSessionsCommand } = await import("./revoke-all-365NRBOA.js");
|
|
4502
4507
|
await revokeAllSessionsCommand();
|
|
4503
4508
|
});
|
|
4504
4509
|
}
|
|
@@ -5109,9 +5114,51 @@ function registerEwbCommands(program2) {
|
|
|
5109
5114
|
});
|
|
5110
5115
|
}
|
|
5111
5116
|
|
|
5117
|
+
// src/bin/registrars/backup.ts
|
|
5118
|
+
function registerBackupCommands(program2) {
|
|
5119
|
+
program2.command("export").description("Download a full tenant backup as a .tar.gz archive").requiredOption("--tenant <slug-or-id>", "Tenant slug or UUID to export").requiredOption("-o, --output <file>", "Output file path (e.g. backup.tar.gz)").addHelpText(
|
|
5120
|
+
"after",
|
|
5121
|
+
`
|
|
5122
|
+
Examples:
|
|
5123
|
+
hisaabo export --tenant my-company -o backup.tar.gz
|
|
5124
|
+
hisaabo export --tenant 550e8400-e29b-41d4-a716-446655440000 -o /tmp/backup.tar.gz
|
|
5125
|
+
|
|
5126
|
+
Exit codes:
|
|
5127
|
+
0 Success
|
|
5128
|
+
1 Not authenticated or insufficient permissions
|
|
5129
|
+
2 Rate limit reached (2 exports per day)
|
|
5130
|
+
5 Server or network error`
|
|
5131
|
+
).action(async (opts) => {
|
|
5132
|
+
const { exportCommand } = await import("./export-ZA43MLWO.js");
|
|
5133
|
+
await exportCommand({ tenant: opts.tenant, output: opts.output });
|
|
5134
|
+
});
|
|
5135
|
+
program2.command("restore").description("Upload a .tar.gz backup archive into an empty tenant").requiredOption("--tenant <slug-or-id>", "Target tenant slug or UUID (must be empty)").requiredOption("-i, --input <file>", "Input backup file path (e.g. backup.tar.gz)").option("-y, --yes", "Skip confirmation prompt").addHelpText(
|
|
5136
|
+
"after",
|
|
5137
|
+
`
|
|
5138
|
+
Examples:
|
|
5139
|
+
hisaabo restore --tenant my-company -i backup.tar.gz
|
|
5140
|
+
hisaabo restore --tenant my-company -i backup.tar.gz --yes
|
|
5141
|
+
hisaabo restore --tenant 550e8400-e29b-41d4-a716-446655440000 -i /tmp/backup.tar.gz -y
|
|
5142
|
+
|
|
5143
|
+
Notes:
|
|
5144
|
+
The target tenant must be completely empty (no businesses).
|
|
5145
|
+
Restore is a one-way operation \u2014 ensure the target is a fresh tenant.
|
|
5146
|
+
|
|
5147
|
+
Exit codes:
|
|
5148
|
+
0 Success
|
|
5149
|
+
1 Not authenticated or insufficient permissions
|
|
5150
|
+
3 Target tenant is not empty
|
|
5151
|
+
4 Input file missing, unreadable, or empty
|
|
5152
|
+
5 Server or network error`
|
|
5153
|
+
).action(async (opts) => {
|
|
5154
|
+
const { restoreCommand } = await import("./import-UUHMLCKX.js");
|
|
5155
|
+
await restoreCommand({ tenant: opts.tenant, input: opts.input, yes: opts.yes });
|
|
5156
|
+
});
|
|
5157
|
+
}
|
|
5158
|
+
|
|
5112
5159
|
// src/bin/hisaabo.ts
|
|
5113
5160
|
var program = new Command();
|
|
5114
|
-
var cliVersion = true ? "0.
|
|
5161
|
+
var cliVersion = true ? "0.8.4" : "dev";
|
|
5115
5162
|
program.name("hisaabo").description("Hisaabo CLI \u2014 Invoicing and business management").version(cliVersion);
|
|
5116
5163
|
registerAuthCommands(program);
|
|
5117
5164
|
registerDashboardCommands(program);
|
|
@@ -5138,6 +5185,7 @@ registerItcCommands(program);
|
|
|
5138
5185
|
registerBankReconCommands(program);
|
|
5139
5186
|
registerEInvoiceCommands(program);
|
|
5140
5187
|
registerEwbCommands(program);
|
|
5188
|
+
registerBackupCommands(program);
|
|
5141
5189
|
program.parseAsync(process.argv).catch((err) => {
|
|
5142
5190
|
fatalError(String(err instanceof Error ? err.message : err));
|
|
5143
5191
|
});
|