@hisaabo/cli 0.9.0 → 0.10.0

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 (66) hide show
  1. package/README.md +154 -4
  2. package/dist/bin/{audit-trail-IJ6SKACR.js → audit-trail-RTPTWZAL.js} +12 -15
  3. package/dist/bin/{categories-O6TODPAH.js → categories-JJDTOT5T.js} +3 -3
  4. package/dist/bin/{check-slug-P7RFU6OP.js → check-slug-5L2VDAEN.js} +16 -4
  5. package/dist/bin/chunk-2DDIXPNI.js +1512 -0
  6. package/dist/bin/chunk-ALOHN6GR.js +78 -0
  7. package/dist/bin/{chunk-QUITS2FE.js → chunk-ESX7V56A.js} +95 -20
  8. package/dist/bin/chunk-M7DVLVD5.js +245 -0
  9. package/dist/bin/{chunk-WDN7RIE3.js → chunk-VXEEFNIY.js} +133 -47
  10. package/dist/bin/client-NFYNYEDI.js +17 -0
  11. package/dist/bin/{collection-efficiency-DA5RWG3V.js → collection-efficiency-UF3AJPQB.js} +12 -56
  12. package/dist/bin/{config-4LLNT4SH.js → config-7HVBRHL3.js} +2 -2
  13. package/dist/bin/{create-C5INBPQO.js → create-2BZQLXQA.js} +18 -9
  14. package/dist/bin/{default-account-2GMQ7ZA4.js → default-account-MR6O5LPT.js} +7 -13
  15. package/dist/bin/{expenses-S2YVA5UT.js → expenses-CU6JGDVX.js} +12 -11
  16. package/dist/bin/{export-YOOODNVX.js → export-GFYQIQLT.js} +9 -24
  17. package/dist/bin/{export-6PMJ2YVL.js → export-WS24LYNH.js} +47 -11
  18. package/dist/bin/{factory-6MUCSXTL.js → factory-JSEQCPY3.js} +51 -57
  19. package/dist/bin/{get-GMQRROK2.js → get-HGMB7T6Y.js} +5 -4
  20. package/dist/bin/{get-ZV3SC2VY.js → get-KAOGGRJR.js} +4 -4
  21. package/dist/bin/hisaabo.js +2024 -837
  22. package/dist/bin/{import-UUHMLCKX.js → import-6CEMNCTM.js} +30 -33
  23. package/dist/bin/{invitations-OVORTTMF.js → invitations-LASABD2X.js} +11 -14
  24. package/dist/bin/{invite-GGHBZY4U.js → invite-VCBXS7VY.js} +13 -15
  25. package/dist/bin/{invoice-breakdown-32XXAZDP.js → invoice-breakdown-3XXSYA77.js} +12 -37
  26. package/dist/bin/{items-6NOIMH6B.js → items-PJPN6ZX3.js} +11 -10
  27. package/dist/bin/{items-toggle-L6W6QKQD.js → items-toggle-53C35MJU.js} +6 -5
  28. package/dist/bin/{list-RAR56EMQ.js → list-63EKE6DT.js} +13 -16
  29. package/dist/bin/{list-OXAVDXH7.js → list-7OSZX6C7.js} +5 -5
  30. package/dist/bin/{list-FC5JHKHD.js → list-OOROCQR2.js} +11 -12
  31. package/dist/bin/{members-Y6XJVHHR.js → members-SPHU5F4M.js} +7 -7
  32. package/dist/bin/monthly-comparison-3FFJT63K.js +79 -0
  33. package/dist/bin/{order-cancel-QRTCNART.js → order-cancel-RW4NYHKN.js} +8 -18
  34. package/dist/bin/{order-confirm-LGQOMC4O.js → order-confirm-NXFL2EIQ.js} +7 -15
  35. package/dist/bin/{order-get-4XAQCRYV.js → order-get-QPSOY2RT.js} +11 -11
  36. package/dist/bin/{order-update-KZY4H2UR.js → order-update-7DWKEROO.js} +4 -4
  37. package/dist/bin/{output-NUOL7KJW.js → output-XFDIL3A6.js} +5 -1
  38. package/dist/bin/{payment-modes-DY2ZEMK7.js → payment-modes-Z5WV3E3O.js} +12 -27
  39. package/dist/bin/{profit-loss-5GJBG3PL.js → profit-loss-AOISAJ56.js} +14 -13
  40. package/dist/bin/{receivables-aging-6A7XJKDT.js → receivables-aging-5JHFECGB.js} +13 -66
  41. package/dist/bin/{remove-ZBX34TIQ.js → remove-TC4UWMOL.js} +7 -15
  42. package/dist/bin/{revoke-ZTAMW2Q2.js → revoke-QHLNPGI5.js} +7 -3
  43. package/dist/bin/{revoke-XDNOA2GJ.js → revoke-SXVNALYQ.js} +7 -15
  44. package/dist/bin/{revoke-all-365NRBOA.js → revoke-all-CYW6A5UE.js} +8 -4
  45. package/dist/bin/{revoke-invitation-PQH7XNYA.js → revoke-invitation-Z33EUJTS.js} +7 -3
  46. package/dist/bin/safety-TPD2P7I5.js +18 -0
  47. package/dist/bin/{sales-trend-D6PQ7MHY.js → sales-trend-WCW6X5BI.js} +16 -16
  48. package/dist/bin/sequence-HOQ4PQRK.js +56 -0
  49. package/dist/bin/{store-SVRZBUFO.js → store-DDMHTNTO.js} +15 -8
  50. package/dist/bin/{summary-H6U7O5GJ.js → summary-TYAL2D3Q.js} +7 -5
  51. package/dist/bin/{top-customers-ATBN6RDI.js → top-customers-GMIS6GC3.js} +13 -11
  52. package/dist/bin/{top-items-XXU6KYTC.js → top-items-BK54JO3G.js} +16 -14
  53. package/dist/bin/{top-outstanding-JTQNGGW4.js → top-outstanding-L4NRJ6NE.js} +9 -11
  54. package/dist/bin/{unpaid-invoices-BTNQFWCH.js → unpaid-invoices-CEUFEYH7.js} +8 -8
  55. package/dist/bin/{untracked-PAMEDJ6Y.js → untracked-T6DIDMDQ.js} +9 -9
  56. package/dist/bin/{update-EK4NJWU4.js → update-EPNB2U74.js} +4 -4
  57. package/dist/bin/{update-EGHPFXLK.js → update-I2DZRVLR.js} +10 -17
  58. package/dist/bin/{update-6ZMX2OYX.js → update-MFNOVS6D.js} +4 -4
  59. package/dist/bin/{update-role-24PDTNFK.js → update-role-D2ETEL2Q.js} +7 -4
  60. package/dist/bin/{update-settings-AASI6WZX.js → update-settings-UGXLQRYI.js} +15 -9
  61. package/package.json +8 -7
  62. package/dist/bin/chunk-NO4FIFMS.js +0 -176
  63. package/dist/bin/chunk-ZPYC767N.js +0 -157
  64. package/dist/bin/client-36JX5MR3.js +0 -11
  65. package/dist/bin/monthly-comparison-IAUZ6SBJ.js +0 -176
  66. package/dist/bin/sequence-KZWADVD7.js +0 -66
package/README.md CHANGED
@@ -22,12 +22,12 @@ npm install -g @hisaabo/cli
22
22
  hisaabo login --api-url https://your-hisaabo-instance.com
23
23
  ```
24
24
 
25
- You'll be prompted for email and password, then asked to pick a business if you have more than one.
25
+ Your browser opens so you can sign in to the Hisaabo web app (magic link); the CLI receives a one-time code on a local 127.0.0.1 callback and exchanges it using PKCE. The URL is also printed for headless machines. You are then asked to pick a business if you have more than one. On a self-hosted server whose web app is not at the default hosted address, pass `--web-url https://your-web-app` (or set `HISAABO_WEB_URL`).
26
26
 
27
27
  **Log in with an API key (for scripts and CI):**
28
28
 
29
29
  ```bash
30
- hisaabo login --api-url https://your-hisaabo-instance.com --token hisaabo_key_abc123...
30
+ echo "hisaabo_key_abc123..." | hisaabo login --api-url https://your-hisaabo-instance.com --token-stdin
31
31
  ```
32
32
 
33
33
  Generate API keys at Settings > API Keys in the Hisaabo web app.
@@ -46,10 +46,13 @@ hisaabo whoami
46
46
 
47
47
  | Command | Description |
48
48
  |---|---|
49
- | `hisaabo login` | Authenticate with email/password or API key |
49
+ | `hisaabo login` | Sign in via browser, or with an API key (`--token-stdin`) |
50
50
  | `hisaabo logout` | Clear saved credentials |
51
51
  | `hisaabo whoami` | Show current user and active business |
52
52
  | `hisaabo switch` | Switch active business |
53
+ | `hisaabo profile update-name <name>` | Update your display name |
54
+ | `hisaabo session list` / `revoke <sessionId>` / `revoke-all` | List, revoke or sign out all active sessions |
55
+ | `hisaabo api-key list` / `create` / `revoke <id>` | Manage API keys (alias: `key`) |
53
56
 
54
57
  ### Business
55
58
 
@@ -57,12 +60,27 @@ hisaabo whoami
57
60
  |---|---|
58
61
  | `hisaabo business list` | List all businesses under your account |
59
62
  | `hisaabo business switch` | Switch active business |
63
+ | `hisaabo business get` | Show current business details |
64
+ | `hisaabo business update` | Update business settings |
65
+ | `hisaabo business sequence --type <type> --next-number <n>` | Set the next document number (invoice, payment, quotation, credit_note, delivery_challan, proforma; cannot go backwards) |
66
+ | `hisaabo business audit-trail` | View the audit log for this business |
67
+ | `hisaabo business export` | Export all business data |
60
68
 
61
69
  ### Dashboard
62
70
 
63
71
  | Command | Description |
64
72
  |---|---|
65
73
  | `hisaabo dashboard` | Financial summary with box-drawing UI (alias: `dash`) |
74
+ | `hisaabo dashboard summary` | Financial summary overview (FY to date) |
75
+ | `hisaabo dashboard sales-trend` | Sales trend over time |
76
+ | `hisaabo dashboard top-outstanding` / `top-customers` / `top-items` | Highest outstanding balances, top customers by revenue, top-selling items |
77
+ | `hisaabo dashboard expenses` | Expenses by category (alias: `expenses-by-category`) |
78
+ | `hisaabo dashboard invoice-breakdown` | Invoice count and amounts by status |
79
+ | `hisaabo dashboard profit-loss` | Profit & Loss statement (alias: `pl`) |
80
+ | `hisaabo dashboard receivables-aging` | Receivables aging buckets |
81
+ | `hisaabo dashboard payment-modes` | Payment mode breakdown |
82
+ | `hisaabo dashboard collection-efficiency` | Collection rate, DSO and aging breakdown |
83
+ | `hisaabo dashboard monthly-comparison` | Month-over-month sales, expenses, profit and collections |
66
84
 
67
85
  ### Invoices
68
86
 
@@ -83,6 +101,11 @@ hisaabo whoami
83
101
  | `party get <id>` | Get party profile with balance |
84
102
  | `party create` | Add a new customer or supplier |
85
103
  | `party ledger <id>` | Debit/credit history for a party |
104
+ | `party update <id>` | Update a party (only the options you pass change) |
105
+ | `party stats <id>` | Invoice and payment counts for a party |
106
+ | `party top-items <id>` | Items a party buys most |
107
+ | `party merge <sourceId> <targetId>` | Merge one party into another (moves invoices and payments) |
108
+ | `party ledger-report <id>` | Ledger report with running balance and totals (`--from`, `--to`, `--this-month`, `--this-fy`) |
86
109
  | `party delete <id>` | Delete a party |
87
110
 
88
111
  ### Items
@@ -93,6 +116,21 @@ hisaabo whoami
93
116
  | `item get <id>` | Get item details with stock and pricing |
94
117
  | `item create` | Add a new product or service |
95
118
  | `item stock <id> <adjustment>` | Adjust stock (+10, -5, or set to 100) |
119
+ | `item update <id>` | Update an item (only the options you pass change) |
120
+ | `item merge <sourceId> <targetId>` | Merge one item into another (`--conversion-factor`) |
121
+ | `item price-history <id>` | Past invoiced prices for an item (`--period 6m\|1y\|all`, `--limit`) |
122
+ | `item price-summary <id>` | Min/max/avg/latest price over a period (`--period`, `--unit`, `--type sale\|purchase`) |
123
+ | `item stock-movements <id>` | Invoice-driven stock in/out (`--period`, `--limit`) |
124
+ | `item stock-summary <id>` | Total stock in/out/net over a period (`--period`, `--unit`) |
125
+ | `item sales-stats <id>` | Lifetime sales totals for an item |
126
+ | `item stock-history <id>` | Stock adjustment history |
127
+ | `item rename-unit <id> --old <u> --new <u>` | Rename one of an item's units |
128
+ | `item switch-base-unit <id> --unit <u> --conversion-factor <n>` | Switch an item's base unit |
129
+ | `item low-stock-count` | Count items below their low-stock threshold |
130
+ | `item variants list <itemId>` | List an item's variants |
131
+ | `item variants create <itemId> --attributes '{"size":"M"}'` | Create a variant |
132
+ | `item variants update <variantId>` | Update a variant |
133
+ | `item variants delete <variantId>` | Delete a variant |
96
134
  | `item delete <id>` | Delete an item |
97
135
 
98
136
  ### Payments
@@ -100,8 +138,19 @@ hisaabo whoami
100
138
  | Command | Description |
101
139
  |---|---|
102
140
  | `payment list` | List payments (filterable by party, date range) |
103
- | `payment create` | Record a payment (cash, bank, UPI, cheque) |
141
+ | `payment create` | Record a payment (cash, bank, UPI, cheque). Pick the party with `--party-id <id>` or `--party <name>` (exact name, case-insensitive; not both). For a customer receipt where TDS was withheld, add `--tds-amount`, `--tds-section` and `--tds-rate` (needs `--invoice-id`; `--amount` is then the net cash received) |
142
+ | `payment get <id>` | Get payment details |
143
+ | `payment update <id>` | Update a payment |
104
144
  | `payment delete <id>` | Delete a payment |
145
+ | `payment unpaid-invoices <partyId>` | List unpaid invoices for a party |
146
+ | `payment untracked` | List payments not linked to a bank account |
147
+ | `payment default-account` | Show the recommended bank account for payments |
148
+
149
+ ### TDS Sections
150
+
151
+ | Command | Description |
152
+ |---|---|
153
+ | `tds-section list` | List the TDS section codes available when recording customer receipts (use one with `payment create --tds-section <code>`). `--include-inactive` also shows inactive sections |
105
154
 
106
155
  ### Expenses
107
156
 
@@ -109,7 +158,9 @@ hisaabo whoami
109
158
  |---|---|
110
159
  | `expense list` | List expenses (filterable by category, date range) |
111
160
  | `expense create` | Record a business expense |
161
+ | `expense update <id>` | Update an expense |
112
162
  | `expense delete <id>` | Delete an expense |
163
+ | `expense categories` | List all expense categories |
113
164
 
114
165
  ### Bank Accounts
115
166
 
@@ -120,6 +171,16 @@ hisaabo whoami
120
171
  | `bank create` | Add a new bank account |
121
172
  | `bank transfer` | Transfer between accounts |
122
173
  | `bank transactions <id>` | List transactions for an account |
174
+ | `bank gateway-config <accountId>` | Show a payment gateway account's charge rates and settlement account |
175
+ | `bank update-gateway <accountId>` | Update gateway charge configuration |
176
+
177
+ ### Bank Reconciliation
178
+
179
+ | Command | Description |
180
+ |---|---|
181
+ | `bank-recon imports` | List bank statement imports |
182
+ | `bank-recon summary <importId>` | Reconciliation summary for an import |
183
+ | `bank-recon rules` | List auto-matching rules |
123
184
 
124
185
  ### GST
125
186
 
@@ -128,6 +189,17 @@ hisaabo whoami
128
189
  | `gst r1` | GSTR-1 report (by quarter or month) |
129
190
  | `gst r3b` | GSTR-3B report (by quarter or month) |
130
191
  | `gst r1-csv` | Download GSTR-1 as GSTN-compatible CSV for filing |
192
+ | `gst gstr9 <fy>` | GSTR-9 annual return (for example `2023-24`) |
193
+ | `gst gstr2b-uploads` | List GSTR-2B uploaded periods |
194
+
195
+ ### E-Invoice, E-Way Bill and ITC
196
+
197
+ | Command | Description |
198
+ |---|---|
199
+ | `einvoice dashboard` / `generate <invoiceId>` / `cancel <invoiceId>` / `retry <invoiceId>` | E-invoice (IRP) summary, generation, cancellation and retry |
200
+ | `ewb dashboard` / `generate <invoiceId>` / `expiring` | E-way bill summary, generation and bills expiring in 24 hours |
201
+ | `itc dashboard` / `ledger` / `aging` | Input Tax Credit summary, ledger and credits at risk of reversal |
202
+ | `itc block <invoiceId>` / `unblock <invoiceId>` | Mark ITC for an invoice as blocked or eligible |
131
203
 
132
204
  ### Reports
133
205
 
@@ -138,6 +210,21 @@ hisaabo whoami
138
210
  | `report tax-summary` | Tax collected and paid, grouped by rate |
139
211
  | `report item-sales` | Item-wise sales breakdown |
140
212
  | `report stock` | Current stock summary |
213
+ | `report sales-register` / `purchase-register` | Sales or purchase invoice listing |
214
+ | `report party-statement <partyId>` | Party transaction statement |
215
+ | `report payment-summary` | Payment summary by mode |
216
+ | `report cash-flow` | Cash flow forecast |
217
+ | `report collection-efficiency` | Collection efficiency metrics |
218
+ | `report trial-balance` / `balance-sheet` / `cash-flow-statement` | Trial balance, balance sheet, cash flow statement |
219
+ | `report general-ledger <accountId>` | General ledger for one account |
220
+
221
+ ### Journal Entries
222
+
223
+ | Command | Description |
224
+ |---|---|
225
+ | `journal list` / `get <id>` | List journal entries or show one |
226
+ | `journal void <id>` | Void a journal entry |
227
+ | `journal templates` | List journal entry templates |
141
228
 
142
229
  ### Shipments
143
230
 
@@ -167,13 +254,21 @@ hisaabo whoami
167
254
  | `automated-invoice resume <id>` | Resume a paused template |
168
255
  | `automated-invoice run-now <id>` | Manually trigger invoice generation |
169
256
  | `automated-invoice delete <id>` | Delete a template |
257
+ | `automated-invoice update <id>` | Update a template |
258
+ | `automated-invoice history <templateId>` | Execution history for a template |
259
+ | `automated-invoice usage` | Plan usage for recurring invoices |
260
+ | `automated-invoice suggestions` | Suggested templates based on invoice history |
170
261
 
171
262
  ### Store
172
263
 
173
264
  | Command | Description |
174
265
  |---|---|
175
266
  | `store settings` | Show online store settings |
267
+ | `store update-settings` | Update store settings |
268
+ | `store items` / `items-toggle` | List store items, or bulk enable / disable them |
176
269
  | `store orders` | List store orders |
270
+ | `store order-get <id>` / `order-confirm <id>` / `order-cancel <id>` / `order-update <id>` | Show, confirm, cancel or update an order |
271
+ | `store check-slug <slug>` | Check store slug availability |
177
272
 
178
273
  ### Import
179
274
 
@@ -181,6 +276,42 @@ hisaabo whoami
181
276
  |---|---|
182
277
  | `import parties <file>` | Bulk import parties from JSON or CSV |
183
278
  | `import items <file>` | Bulk import items from JSON or CSV |
279
+ | `import invoices <file>` | Bulk import invoices from JSON or CSV |
280
+ | `import payments <file>` | Bulk import payments from JSON or CSV |
281
+
282
+ `--source` defaults to `hisaabo` (the Hisaabo export format); use `--source mybillbook` for myBillBook files.
283
+
284
+ ### Other Documents
285
+
286
+ Each of `quotation`, `credit-note`, `debit-note`, `delivery-challan`, `proforma`, `sales-return` and `purchase-return` has the same subcommands:
287
+
288
+ | Command | Description |
289
+ |---|---|
290
+ | `<type> list` / `get <id>` | List documents or show one |
291
+ | `<type> create` | Create a document |
292
+ | `<type> update-status <id> <status>` | Change status (the valid statuses are listed in `hisaabo <type> update-status --help`) |
293
+ | `<type> delete <id>` | Delete a document |
294
+ | `document convert` | Convert one document type to another (for example quotation to invoice) |
295
+
296
+ ### Team (Tenant)
297
+
298
+ | Command | Description |
299
+ |---|---|
300
+ | `tenant list` | List organizations you belong to |
301
+ | `tenant members` | List members of the current tenant |
302
+ | `tenant invite <email>` | Invite a user |
303
+ | `tenant remove <userId>` | Remove a member |
304
+ | `tenant update-role <userId> <role>` | Change a member's role (admin, seller_manager, seller, accountant) |
305
+ | `tenant invitations` / `revoke-invitation <invitationId>` | List or revoke pending invitations |
306
+
307
+ ### Notifications
308
+
309
+ | Command | Description |
310
+ |---|---|
311
+ | `notifications list` | List notifications for the active business |
312
+ | `notifications read` | Mark notifications as read |
313
+ | `notifications prefs` | Show your notification preferences per channel |
314
+ | `notifications set` | Change your preference for one channel |
184
315
 
185
316
  ### Backup & Restore
186
317
 
@@ -286,6 +417,25 @@ Most commands accept these flags:
286
417
  | `--this-month` | Filter to current calendar month |
287
418
  | `--this-fy` | Filter to current financial year (April-March) |
288
419
  | `-y, --yes` | Skip confirmation prompts |
420
+ | `--tz <zone>` | Global option: IANA time zone for date boundaries (see below) |
421
+
422
+ ### Dates and time zones
423
+
424
+ `--from`, `--to`, `--this-month`, `--this-fy` and other date options take a plain
425
+ `YYYY-MM-DD` date and mean that calendar day **in your local time zone**: `--from`
426
+ is the start of the day (00:00:00.000) and `--to` is the end of the day
427
+ (23:59:59.999), converted to the equivalent UTC instant before being sent to the
428
+ server. Daylight-saving changes are handled per date. "Today", the current month
429
+ and the financial year are also computed in that zone.
430
+
431
+ To use a different zone, pass the global `--tz <IANA name>` option or set
432
+ `HISAABO_TZ`. Precedence: `--tz`, then `HISAABO_TZ`, then the machine's zone.
433
+ An unknown zone name is rejected with an error.
434
+
435
+ ```bash
436
+ hisaabo --tz Asia/Kolkata invoice list --from 2025-04-01 --to 2025-04-30
437
+ HISAABO_TZ=America/New_York hisaabo dashboard profit-loss --this-month
438
+ ```
289
439
 
290
440
  ---
291
441
 
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  formatDate
4
- } from "./chunk-ZPYC767N.js";
4
+ } from "./chunk-M7DVLVD5.js";
5
5
  import {
6
6
  HisaaboApiError,
7
7
  HisaaboClient
8
- } from "./chunk-WDN7RIE3.js";
8
+ } from "./chunk-VXEEFNIY.js";
9
9
  import {
10
10
  requireAuth
11
- } from "./chunk-QUITS2FE.js";
11
+ } from "./chunk-ESX7V56A.js";
12
12
  import {
13
13
  EXIT,
14
14
  fatalError,
@@ -18,7 +18,7 @@ import {
18
18
  outputTSV,
19
19
  outputTable,
20
20
  paginationFooter
21
- } from "./chunk-NO4FIFMS.js";
21
+ } from "./chunk-2DDIXPNI.js";
22
22
 
23
23
  // src/commands/business/audit-trail.ts
24
24
  import chalk from "chalk";
@@ -35,17 +35,14 @@ async function businessAuditTrailCommand(opts) {
35
35
  outputJSON(data);
36
36
  return;
37
37
  }
38
- const items = Array.isArray(data) ? data : Array.isArray(data?.items) ? data.items : Array.isArray(data?.data) ? data.data : [];
39
- const total = typeof data?.total === "number" ? data.total : items.length;
40
- const rows = items.map((item) => {
41
- const r = item;
42
- return {
43
- timestamp: formatDate(String(r["createdAt"] ?? r["timestamp"] ?? "")),
44
- user: String(r["userName"] ?? r["user"] ?? r["userEmail"] ?? "-"),
45
- action: String(r["action"] ?? r["event"] ?? "-"),
46
- details: String(r["details"] ?? r["description"] ?? r["meta"] ?? "-")
47
- };
48
- });
38
+ const items = data.data;
39
+ const total = data.total;
40
+ const rows = items.map((r) => ({
41
+ timestamp: formatDate(r.createdAt),
42
+ user: r.userName,
43
+ action: r.action,
44
+ details: r.metadata ?? `${r.entityType}${r.entityId ? ` ${r.entityId}` : ""}`
45
+ }));
49
46
  const columns = [
50
47
  { key: "timestamp", header: "Date", align: "left" },
51
48
  { key: "user", header: "User", align: "left", width: 28 },
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  HisaaboApiError,
4
4
  HisaaboClient
5
- } from "./chunk-WDN7RIE3.js";
5
+ } from "./chunk-VXEEFNIY.js";
6
6
  import {
7
7
  requireAuth
8
- } from "./chunk-QUITS2FE.js";
8
+ } from "./chunk-ESX7V56A.js";
9
9
  import {
10
10
  EXIT,
11
11
  fatalError,
12
12
  outputJSON
13
- } from "./chunk-NO4FIFMS.js";
13
+ } from "./chunk-2DDIXPNI.js";
14
14
 
15
15
  // src/commands/expense/categories.ts
16
16
  async function expenseCategoriesCommand(opts) {
@@ -2,16 +2,16 @@
2
2
  import {
3
3
  HisaaboApiError,
4
4
  HisaaboClient
5
- } from "./chunk-WDN7RIE3.js";
5
+ } from "./chunk-VXEEFNIY.js";
6
6
  import {
7
7
  requireAuth
8
- } from "./chunk-QUITS2FE.js";
8
+ } from "./chunk-ESX7V56A.js";
9
9
  import {
10
10
  EXIT,
11
11
  fatalError,
12
12
  hasColor,
13
13
  outputJSON
14
- } from "./chunk-NO4FIFMS.js";
14
+ } from "./chunk-2DDIXPNI.js";
15
15
 
16
16
  // src/commands/store/check-slug.ts
17
17
  import chalk from "chalk";
@@ -24,7 +24,7 @@ async function storeCheckSlugCommand(slug, opts) {
24
24
  outputJSON(result);
25
25
  return;
26
26
  }
27
- const available = typeof result === "object" && result !== null ? result["available"] : result;
27
+ const available = result.available;
28
28
  if (available) {
29
29
  if (hasColor()) {
30
30
  process.stdout.write(chalk.green(`
@@ -35,6 +35,18 @@ async function storeCheckSlugCommand(slug, opts) {
35
35
  process.stdout.write(`
36
36
  OK: "${slug}" is available
37
37
 
38
+ `);
39
+ }
40
+ } else if (result.reserved) {
41
+ if (hasColor()) {
42
+ process.stdout.write(chalk.red(`
43
+ \u2717 "${slug}" is reserved
44
+
45
+ `));
46
+ } else {
47
+ process.stdout.write(`
48
+ RESERVED: "${slug}" is reserved
49
+
38
50
  `);
39
51
  }
40
52
  } else {