@hisaabo/cli 0.6.1 → 0.7.5

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 (59) hide show
  1. package/.turbo/turbo-typecheck.log +1 -1
  2. package/dist/bin/{audit-trail-4AMEFQGB.js → audit-trail-DLSSSM4T.js} +3 -3
  3. package/dist/bin/{categories-CLCBRNWC.js → categories-63QR6WCV.js} +2 -2
  4. package/dist/bin/{check-slug-OKW7KDYG.js → check-slug-NXO55WKH.js} +2 -2
  5. package/dist/bin/{chunk-FIMJZAS4.js → chunk-7MJDOL6B.js} +18 -1
  6. package/dist/bin/{chunk-GXRLFDZW.js → chunk-M42SETRZ.js} +9 -0
  7. package/dist/bin/{chunk-T63VQXNM.js → chunk-ZPYC767N.js} +1 -0
  8. package/dist/bin/{client-2ZKMLWI6.js → client-T32CIZA3.js} +1 -1
  9. package/dist/bin/{collection-efficiency-TECE6PVQ.js → collection-efficiency-T6PWNTZO.js} +3 -3
  10. package/dist/bin/{config-335MN4I7.js → config-V4QFCONN.js} +3 -1
  11. package/dist/bin/{create-AS2YVGRA.js → create-NUKHDWLK.js} +2 -2
  12. package/dist/bin/{default-account-3RVSU7RF.js → default-account-JWFPHMRF.js} +2 -2
  13. package/dist/bin/{expenses-KXFQJKD6.js → expenses-2UWUZVLI.js} +3 -3
  14. package/dist/bin/{export-UHZISG7H.js → export-XSX7WQH7.js} +2 -2
  15. package/dist/bin/{factory-OBESY2LG.js → factory-BWOKRIP4.js} +3 -3
  16. package/dist/bin/{get-WUSYEMG4.js → get-CHNTG3IM.js} +2 -2
  17. package/dist/bin/{get-GTL556HL.js → get-ZSZ6SL3N.js} +3 -3
  18. package/dist/bin/hisaabo.js +64 -59
  19. package/dist/bin/{invitations-U4ZNYWY7.js → invitations-H2SL3XAD.js} +2 -2
  20. package/dist/bin/{invite-5S4GJKRF.js → invite-EW73UIBE.js} +2 -2
  21. package/dist/bin/{invoice-breakdown-PP3BZQLG.js → invoice-breakdown-XP4QATCF.js} +3 -3
  22. package/dist/bin/{items-CHEFLI7C.js → items-DPD6EFTP.js} +3 -3
  23. package/dist/bin/{items-toggle-ETVCDCU6.js → items-toggle-R4OPSE4W.js} +2 -2
  24. package/dist/bin/{list-RJ34MFPR.js → list-KLEHBMQ2.js} +2 -2
  25. package/dist/bin/{list-3FO4UJKC.js → list-PKHBE475.js} +3 -3
  26. package/dist/bin/{list-LQJGTZB4.js → list-UR7OOJVF.js} +2 -2
  27. package/dist/bin/{members-TE5K5NQC.js → members-XA3TF4IQ.js} +3 -3
  28. package/dist/bin/{monthly-comparison-Q6KPMTPS.js → monthly-comparison-OLVS5HEY.js} +3 -3
  29. package/dist/bin/{order-cancel-NOQDBL2N.js → order-cancel-MXMJFFRR.js} +2 -2
  30. package/dist/bin/{order-confirm-6WMKTGPV.js → order-confirm-IXU45Q4L.js} +2 -2
  31. package/dist/bin/{order-get-ONWR4GTW.js → order-get-RDXMHLJ7.js} +3 -3
  32. package/dist/bin/{order-update-IVO4AFGV.js → order-update-KGIPBEJX.js} +3 -3
  33. package/dist/bin/{payment-modes-FXB2G6WP.js → payment-modes-CZL35SVS.js} +3 -3
  34. package/dist/bin/{profit-loss-XPYELDTH.js → profit-loss-M332OSC5.js} +3 -3
  35. package/dist/bin/{receivables-aging-MU6Q3DZ4.js → receivables-aging-OXRHGMBF.js} +3 -3
  36. package/dist/bin/{remove-DJBOOOR4.js → remove-I5HD2Y4K.js} +2 -2
  37. package/dist/bin/{revoke-5L5GZ4ZZ.js → revoke-MFLWGCMP.js} +2 -2
  38. package/dist/bin/{revoke-WRIK7HLY.js → revoke-OC6AOMIZ.js} +2 -2
  39. package/dist/bin/{revoke-all-QARW2G6R.js → revoke-all-FSAPBB3P.js} +2 -2
  40. package/dist/bin/{revoke-invitation-ZGLJHYNB.js → revoke-invitation-JXDPXTOW.js} +2 -2
  41. package/dist/bin/{sales-trend-P5HOZJSX.js → sales-trend-KK63WNDL.js} +3 -3
  42. package/dist/bin/{sequence-LK6QLSI5.js → sequence-IQ4HUJ3W.js} +2 -2
  43. package/dist/bin/{store-FU7CEILC.js → store-6QT6HKG2.js} +3 -3
  44. package/dist/bin/{summary-XONLN72I.js → summary-3FTF5B4A.js} +3 -3
  45. package/dist/bin/{top-customers-U6HQW2GH.js → top-customers-HNYGXBQZ.js} +3 -3
  46. package/dist/bin/{top-items-EAOIVZ4P.js → top-items-JUDG3BVW.js} +3 -3
  47. package/dist/bin/{top-outstanding-4546FJDH.js → top-outstanding-WK26ZNE5.js} +3 -3
  48. package/dist/bin/{unpaid-invoices-AED55PLC.js → unpaid-invoices-RYFIIIK7.js} +3 -3
  49. package/dist/bin/{untracked-ZEM2CDHC.js → untracked-FAFS3KCK.js} +3 -3
  50. package/dist/bin/{update-FO7AAXF5.js → update-5YSPXIWO.js} +3 -3
  51. package/dist/bin/{update-OZPBIBME.js → update-I46XLU77.js} +2 -2
  52. package/dist/bin/{update-QCK32XAG.js → update-NAW2JWZS.js} +3 -3
  53. package/dist/bin/{update-role-RB35QIA5.js → update-role-5GV42MSN.js} +2 -2
  54. package/dist/bin/{update-settings-EUC2FJQJ.js → update-settings-KYSQDIEO.js} +2 -2
  55. package/package.json +1 -1
  56. package/src/client.ts +21 -1
  57. package/src/commands/invoice/get.ts +9 -1
  58. package/src/config.ts +24 -0
  59. package/src/format.ts +1 -0
@@ -11,18 +11,18 @@ import {
11
11
  monthStart,
12
12
  quarterRange,
13
13
  todayISO
14
- } from "./chunk-T63VQXNM.js";
14
+ } from "./chunk-ZPYC767N.js";
15
15
  import {
16
16
  HisaaboApiError,
17
17
  HisaaboClient
18
- } from "./chunk-GXRLFDZW.js";
18
+ } from "./chunk-M42SETRZ.js";
19
19
  import {
20
20
  clearConfig,
21
21
  getConfig,
22
22
  getConfigPath,
23
23
  requireAuth,
24
24
  setConfig
25
- } from "./chunk-FIMJZAS4.js";
25
+ } from "./chunk-7MJDOL6B.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-XONLN72I.js");
393
+ const { dashboardCommand } = await import("./summary-3FTF5B4A.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-P5HOZJSX.js");
397
+ const { dashboardSalesTrendCommand } = await import("./sales-trend-KK63WNDL.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-4546FJDH.js");
401
+ const { dashboardTopOutstandingCommand } = await import("./top-outstanding-WK26ZNE5.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-U6HQW2GH.js");
405
+ const { dashboardTopCustomersCommand } = await import("./top-customers-HNYGXBQZ.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-EAOIVZ4P.js");
417
+ const { dashboardTopItemsCommand } = await import("./top-items-JUDG3BVW.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-KXFQJKD6.js");
430
+ const { dashboardExpensesCommand } = await import("./expenses-2UWUZVLI.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-PP3BZQLG.js");
442
+ const { dashboardInvoiceBreakdownCommand } = await import("./invoice-breakdown-XP4QATCF.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-XPYELDTH.js");
452
+ const { dashboardProfitLossCommand } = await import("./profit-loss-M332OSC5.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-MU6Q3DZ4.js");
463
+ const { dashboardReceivablesAgingCommand } = await import("./receivables-aging-OXRHGMBF.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-FXB2G6WP.js");
467
+ const { dashboardPaymentModesCommand } = await import("./payment-modes-CZL35SVS.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-TECE6PVQ.js");
478
+ const { dashboardCollectionEfficiencyCommand } = await import("./collection-efficiency-T6PWNTZO.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-Q6KPMTPS.js");
489
+ const { dashboardMonthlyComparisonCommand } = await import("./monthly-comparison-OLVS5HEY.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
- line2(`Balance:`, formatAmount(inv.balanceDue).padStart(16));
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-GTL556HL.js");
1821
+ const { paymentGetCommand } = await import("./get-ZSZ6SL3N.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-QCK32XAG.js");
1825
+ const { paymentUpdateCommand } = await import("./update-NAW2JWZS.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-AED55PLC.js");
1836
+ const { paymentUnpaidInvoicesCommand } = await import("./unpaid-invoices-RYFIIIK7.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-ZEM2CDHC.js");
1840
+ const { paymentUntrackedCommand } = await import("./untracked-FAFS3KCK.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-3RVSU7RF.js");
1849
+ const { paymentDefaultAccountCommand } = await import("./default-account-JWFPHMRF.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-FO7AAXF5.js");
1988
+ const { expenseUpdateCommand } = await import("./update-5YSPXIWO.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-CLCBRNWC.js");
2000
+ const { expenseCategoriesCommand } = await import("./categories-63QR6WCV.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-FU7CEILC.js");
3455
+ const { storeSettingsCommand } = await import("./store-6QT6HKG2.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-EUC2FJQJ.js");
3459
+ const { storeUpdateSettingsCommand } = await import("./update-settings-KYSQDIEO.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-CHEFLI7C.js");
3468
+ const { storeItemsCommand } = await import("./items-DPD6EFTP.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-ETVCDCU6.js");
3472
+ const { storeItemsToggleCommand } = await import("./items-toggle-R4OPSE4W.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-FU7CEILC.js");
3480
+ const { storeOrdersCommand } = await import("./store-6QT6HKG2.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-ONWR4GTW.js");
3489
+ const { storeOrderGetCommand } = await import("./order-get-RDXMHLJ7.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-6WMKTGPV.js");
3493
+ const { storeOrderConfirmCommand } = await import("./order-confirm-IXU45Q4L.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-NOQDBL2N.js");
3497
+ const { storeOrderCancelCommand } = await import("./order-cancel-MXMJFFRR.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-IVO4AFGV.js");
3505
+ const { storeOrderUpdateCommand } = await import("./order-update-KGIPBEJX.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-OKW7KDYG.js");
3509
+ const { storeCheckSlugCommand } = await import("./check-slug-NXO55WKH.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-WUSYEMG4.js");
4276
+ const { businessGetCommand } = await import("./get-CHNTG3IM.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-OZPBIBME.js");
4280
+ const { businessUpdateCommand } = await import("./update-I46XLU77.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-LK6QLSI5.js");
4284
+ const { businessSequenceCommand } = await import("./sequence-IQ4HUJ3W.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-4AMEFQGB.js");
4288
+ const { businessAuditTrailCommand } = await import("./audit-trail-DLSSSM4T.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-UHZISG7H.js");
4292
+ const { businessExportCommand } = await import("./export-XSX7WQH7.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-OBESY2LG.js");
4374
+ const { docListCommand } = await import("./factory-BWOKRIP4.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-OBESY2LG.js");
4378
+ const { docGetCommand } = await import("./factory-BWOKRIP4.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-OBESY2LG.js");
4382
+ const { docCreateCommand } = await import("./factory-BWOKRIP4.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-OBESY2LG.js");
4386
+ const { docStatusCommand } = await import("./factory-BWOKRIP4.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-OBESY2LG.js");
4390
+ const { docDeleteCommand } = await import("./factory-BWOKRIP4.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-2ZKMLWI6.js");
4391
- const { requireAuth: requireAuth2 } = await import("./config-335MN4I7.js");
4395
+ const { HisaaboClient: HisaaboClient2, HisaaboApiError: HisaaboApiError2 } = await import("./client-T32CIZA3.js");
4396
+ const { requireAuth: requireAuth2 } = await import("./config-V4QFCONN.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-RJ34MFPR.js");
4448
+ const { tenantListCommand } = await import("./list-KLEHBMQ2.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-TE5K5NQC.js");
4452
+ const { tenantMembersCommand } = await import("./members-XA3TF4IQ.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-5S4GJKRF.js");
4456
+ const { tenantInviteCommand } = await import("./invite-EW73UIBE.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-DJBOOOR4.js");
4460
+ const { tenantRemoveCommand } = await import("./remove-I5HD2Y4K.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-RB35QIA5.js");
4464
+ const { tenantUpdateRoleCommand } = await import("./update-role-5GV42MSN.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-U4ZNYWY7.js");
4468
+ const { listInvitationsCommand } = await import("./invitations-H2SL3XAD.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-ZGLJHYNB.js");
4472
+ const { revokeInvitationCommand } = await import("./revoke-invitation-JXDPXTOW.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-3FO4UJKC.js");
4481
+ const { apiKeyListCommand } = await import("./list-PKHBE475.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-AS2YVGRA.js");
4485
+ const { apiKeyCreateCommand } = await import("./create-NUKHDWLK.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-WRIK7HLY.js");
4489
+ const { apiKeyRevokeCommand } = await import("./revoke-OC6AOMIZ.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-LQJGTZB4.js");
4498
+ const { listSessionsCommand } = await import("./list-UR7OOJVF.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-5L5GZ4ZZ.js");
4502
+ const { revokeSessionCommand } = await import("./revoke-MFLWGCMP.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-QARW2G6R.js");
4506
+ const { revokeAllSessionsCommand } = await import("./revoke-all-FSAPBB3P.js");
4502
4507
  await revokeAllSessionsCommand();
4503
4508
  });
4504
4509
  }
@@ -5111,7 +5116,7 @@ function registerEwbCommands(program2) {
5111
5116
 
5112
5117
  // src/bin/hisaabo.ts
5113
5118
  var program = new Command();
5114
- var cliVersion = true ? "0.6.1" : "dev";
5119
+ var cliVersion = true ? "0.7.5" : "dev";
5115
5120
  program.name("hisaabo").description("Hisaabo CLI \u2014 Invoicing and business management").version(cliVersion);
5116
5121
  registerAuthCommands(program);
5117
5122
  registerDashboardCommands(program);
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  HisaaboApiError,
4
4
  HisaaboClient
5
- } from "./chunk-GXRLFDZW.js";
5
+ } from "./chunk-M42SETRZ.js";
6
6
  import {
7
7
  requireAuth
8
- } from "./chunk-FIMJZAS4.js";
8
+ } from "./chunk-7MJDOL6B.js";
9
9
  import {
10
10
  EXIT,
11
11
  fatalError,
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  HisaaboApiError,
4
4
  HisaaboClient
5
- } from "./chunk-GXRLFDZW.js";
5
+ } from "./chunk-M42SETRZ.js";
6
6
  import {
7
7
  requireAuth
8
- } from "./chunk-FIMJZAS4.js";
8
+ } from "./chunk-7MJDOL6B.js";
9
9
  import {
10
10
  EXIT,
11
11
  fatalError,
@@ -6,14 +6,14 @@ import {
6
6
  monthEnd,
7
7
  monthStart,
8
8
  todayISO
9
- } from "./chunk-T63VQXNM.js";
9
+ } from "./chunk-ZPYC767N.js";
10
10
  import {
11
11
  HisaaboApiError,
12
12
  HisaaboClient
13
- } from "./chunk-GXRLFDZW.js";
13
+ } from "./chunk-M42SETRZ.js";
14
14
  import {
15
15
  requireAuth
16
- } from "./chunk-FIMJZAS4.js";
16
+ } from "./chunk-7MJDOL6B.js";
17
17
  import {
18
18
  EXIT,
19
19
  fatalError,
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  formatAmount
4
- } from "./chunk-T63VQXNM.js";
4
+ } from "./chunk-ZPYC767N.js";
5
5
  import {
6
6
  HisaaboApiError,
7
7
  HisaaboClient
8
- } from "./chunk-GXRLFDZW.js";
8
+ } from "./chunk-M42SETRZ.js";
9
9
  import {
10
10
  requireAuth
11
- } from "./chunk-FIMJZAS4.js";
11
+ } from "./chunk-7MJDOL6B.js";
12
12
  import {
13
13
  EXIT,
14
14
  fatalError,
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  HisaaboApiError,
4
4
  HisaaboClient
5
- } from "./chunk-GXRLFDZW.js";
5
+ } from "./chunk-M42SETRZ.js";
6
6
  import {
7
7
  requireAuth
8
- } from "./chunk-FIMJZAS4.js";
8
+ } from "./chunk-7MJDOL6B.js";
9
9
  import {
10
10
  EXIT,
11
11
  fatalError,
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  HisaaboApiError,
4
4
  HisaaboClient
5
- } from "./chunk-GXRLFDZW.js";
5
+ } from "./chunk-M42SETRZ.js";
6
6
  import {
7
7
  requireAuth
8
- } from "./chunk-FIMJZAS4.js";
8
+ } from "./chunk-7MJDOL6B.js";
9
9
  import {
10
10
  EXIT,
11
11
  fatalError,
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  formatDate,
4
4
  formatRelativeDate
5
- } from "./chunk-T63VQXNM.js";
5
+ } from "./chunk-ZPYC767N.js";
6
6
  import {
7
7
  HisaaboApiError,
8
8
  HisaaboClient
9
- } from "./chunk-GXRLFDZW.js";
9
+ } from "./chunk-M42SETRZ.js";
10
10
  import {
11
11
  requireAuth
12
- } from "./chunk-FIMJZAS4.js";
12
+ } from "./chunk-7MJDOL6B.js";
13
13
  import {
14
14
  EXIT,
15
15
  fatalError,
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  HisaaboApiError,
4
4
  HisaaboClient
5
- } from "./chunk-GXRLFDZW.js";
5
+ } from "./chunk-M42SETRZ.js";
6
6
  import {
7
7
  requireAuth
8
- } from "./chunk-FIMJZAS4.js";
8
+ } from "./chunk-7MJDOL6B.js";
9
9
  import {
10
10
  EXIT,
11
11
  fatalError,
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  formatDate
4
- } from "./chunk-T63VQXNM.js";
4
+ } from "./chunk-ZPYC767N.js";
5
5
  import {
6
6
  HisaaboApiError,
7
7
  HisaaboClient
8
- } from "./chunk-GXRLFDZW.js";
8
+ } from "./chunk-M42SETRZ.js";
9
9
  import {
10
10
  requireAuth
11
- } from "./chunk-FIMJZAS4.js";
11
+ } from "./chunk-7MJDOL6B.js";
12
12
  import {
13
13
  EXIT,
14
14
  fatalError,
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  formatAmount
4
- } from "./chunk-T63VQXNM.js";
4
+ } from "./chunk-ZPYC767N.js";
5
5
  import {
6
6
  HisaaboApiError,
7
7
  HisaaboClient
8
- } from "./chunk-GXRLFDZW.js";
8
+ } from "./chunk-M42SETRZ.js";
9
9
  import {
10
10
  requireAuth
11
- } from "./chunk-FIMJZAS4.js";
11
+ } from "./chunk-7MJDOL6B.js";
12
12
  import {
13
13
  EXIT,
14
14
  fatalError,
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  HisaaboApiError,
4
4
  HisaaboClient
5
- } from "./chunk-GXRLFDZW.js";
5
+ } from "./chunk-M42SETRZ.js";
6
6
  import {
7
7
  requireAuth
8
- } from "./chunk-FIMJZAS4.js";
8
+ } from "./chunk-7MJDOL6B.js";
9
9
  import {
10
10
  EXIT,
11
11
  fatalError,
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  HisaaboApiError,
4
4
  HisaaboClient
5
- } from "./chunk-GXRLFDZW.js";
5
+ } from "./chunk-M42SETRZ.js";
6
6
  import {
7
7
  requireAuth
8
- } from "./chunk-FIMJZAS4.js";
8
+ } from "./chunk-7MJDOL6B.js";
9
9
  import {
10
10
  EXIT,
11
11
  fatalError,
@@ -3,14 +3,14 @@ import {
3
3
  formatAmount,
4
4
  formatDate,
5
5
  formatStatus
6
- } from "./chunk-T63VQXNM.js";
6
+ } from "./chunk-ZPYC767N.js";
7
7
  import {
8
8
  HisaaboApiError,
9
9
  HisaaboClient
10
- } from "./chunk-GXRLFDZW.js";
10
+ } from "./chunk-M42SETRZ.js";
11
11
  import {
12
12
  requireAuth
13
- } from "./chunk-FIMJZAS4.js";
13
+ } from "./chunk-7MJDOL6B.js";
14
14
  import {
15
15
  EXIT,
16
16
  fatalError,