@hisaabo/cli 0.7.5 → 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-DLSSSM4T.js → audit-trail-IJ6SKACR.js} +2 -2
- package/dist/bin/{categories-63QR6WCV.js → categories-O6TODPAH.js} +2 -2
- package/dist/bin/{check-slug-NXO55WKH.js → check-slug-P7RFU6OP.js} +2 -2
- package/dist/bin/chunk-NO4FIFMS.js +0 -0
- package/dist/bin/{chunk-7MJDOL6B.js → chunk-QUITS2FE.js} +28 -0
- package/dist/bin/{chunk-M42SETRZ.js → chunk-WDN7RIE3.js} +23 -2
- package/dist/bin/chunk-ZPYC767N.js +0 -0
- package/dist/bin/{client-T32CIZA3.js → client-36JX5MR3.js} +1 -1
- package/dist/bin/{collection-efficiency-T6PWNTZO.js → collection-efficiency-DA5RWG3V.js} +2 -2
- package/dist/bin/{config-V4QFCONN.js → config-4LLNT4SH.js} +3 -1
- package/dist/bin/{create-NUKHDWLK.js → create-C5INBPQO.js} +2 -2
- package/dist/bin/{default-account-JWFPHMRF.js → default-account-2GMQ7ZA4.js} +2 -2
- package/dist/bin/{expenses-2UWUZVLI.js → expenses-S2YVA5UT.js} +2 -2
- package/dist/bin/{export-XSX7WQH7.js → export-YOOODNVX.js} +2 -2
- package/dist/bin/export-ZA43MLWO.js +191 -0
- package/dist/bin/{factory-BWOKRIP4.js → factory-6MUCSXTL.js} +2 -2
- package/dist/bin/{get-CHNTG3IM.js → get-GMQRROK2.js} +2 -2
- package/dist/bin/{get-ZSZ6SL3N.js → get-ZV3SC2VY.js} +2 -2
- package/dist/bin/hisaabo.js +100 -57
- package/dist/bin/import-UUHMLCKX.js +267 -0
- package/dist/bin/{invitations-H2SL3XAD.js → invitations-OVORTTMF.js} +2 -2
- package/dist/bin/{invite-EW73UIBE.js → invite-GGHBZY4U.js} +2 -2
- package/dist/bin/{invoice-breakdown-XP4QATCF.js → invoice-breakdown-32XXAZDP.js} +2 -2
- package/dist/bin/{items-DPD6EFTP.js → items-6NOIMH6B.js} +2 -2
- package/dist/bin/{items-toggle-R4OPSE4W.js → items-toggle-L6W6QKQD.js} +2 -2
- package/dist/bin/{list-PKHBE475.js → list-FC5JHKHD.js} +2 -2
- package/dist/bin/{list-KLEHBMQ2.js → list-OXAVDXH7.js} +2 -2
- package/dist/bin/{list-UR7OOJVF.js → list-RAR56EMQ.js} +2 -2
- package/dist/bin/{members-XA3TF4IQ.js → members-Y6XJVHHR.js} +2 -2
- package/dist/bin/{monthly-comparison-OLVS5HEY.js → monthly-comparison-IAUZ6SBJ.js} +2 -2
- package/dist/bin/{order-cancel-MXMJFFRR.js → order-cancel-QRTCNART.js} +2 -2
- package/dist/bin/{order-confirm-IXU45Q4L.js → order-confirm-LGQOMC4O.js} +2 -2
- package/dist/bin/{order-get-RDXMHLJ7.js → order-get-4XAQCRYV.js} +2 -2
- package/dist/bin/{order-update-KGIPBEJX.js → order-update-KZY4H2UR.js} +2 -2
- package/dist/bin/output-NUOL7KJW.js +0 -0
- package/dist/bin/{payment-modes-CZL35SVS.js → payment-modes-DY2ZEMK7.js} +2 -2
- package/dist/bin/{profit-loss-M332OSC5.js → profit-loss-5GJBG3PL.js} +2 -2
- package/dist/bin/{receivables-aging-OXRHGMBF.js → receivables-aging-6A7XJKDT.js} +2 -2
- package/dist/bin/{remove-I5HD2Y4K.js → remove-ZBX34TIQ.js} +2 -2
- package/dist/bin/{revoke-OC6AOMIZ.js → revoke-XDNOA2GJ.js} +2 -2
- package/dist/bin/{revoke-MFLWGCMP.js → revoke-ZTAMW2Q2.js} +2 -2
- package/dist/bin/{revoke-all-FSAPBB3P.js → revoke-all-365NRBOA.js} +2 -2
- package/dist/bin/{revoke-invitation-JXDPXTOW.js → revoke-invitation-PQH7XNYA.js} +2 -2
- package/dist/bin/{sales-trend-KK63WNDL.js → sales-trend-D6PQ7MHY.js} +2 -2
- package/dist/bin/{sequence-IQ4HUJ3W.js → sequence-KZWADVD7.js} +2 -2
- package/dist/bin/{store-6QT6HKG2.js → store-SVRZBUFO.js} +2 -2
- package/dist/bin/{summary-3FTF5B4A.js → summary-H6U7O5GJ.js} +2 -2
- package/dist/bin/{top-customers-HNYGXBQZ.js → top-customers-ATBN6RDI.js} +2 -2
- package/dist/bin/{top-items-JUDG3BVW.js → top-items-XXU6KYTC.js} +2 -2
- package/dist/bin/{top-outstanding-WK26ZNE5.js → top-outstanding-JTQNGGW4.js} +2 -2
- package/dist/bin/{unpaid-invoices-RYFIIIK7.js → unpaid-invoices-BTNQFWCH.js} +2 -2
- package/dist/bin/{untracked-FAFS3KCK.js → untracked-PAMEDJ6Y.js} +2 -2
- package/dist/bin/{update-5YSPXIWO.js → update-6ZMX2OYX.js} +2 -2
- package/dist/bin/{update-I46XLU77.js → update-EGHPFXLK.js} +2 -2
- package/dist/bin/{update-NAW2JWZS.js → update-EK4NJWU4.js} +2 -2
- package/dist/bin/{update-role-5GV42MSN.js → update-role-24PDTNFK.js} +2 -2
- package/dist/bin/{update-settings-KYSQDIEO.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 -2071
- 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 -113
- 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 -120
- package/src/error-handler.ts +0 -53
- package/src/format.ts +0 -181
- package/src/output.ts +0 -228
- package/src/spinner.ts +0 -39
- package/tsconfig.json +0 -22
- package/tsup.config.ts +0 -18
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
|
|
3
|
-
export function registerStoreCommands(program: Command): void {
|
|
4
|
-
// ── store ─────────────────────────────────────────────────────────────────
|
|
5
|
-
|
|
6
|
-
const store = program.command("store").description("Online store management");
|
|
7
|
-
|
|
8
|
-
store
|
|
9
|
-
.command("settings")
|
|
10
|
-
.description("Show store settings")
|
|
11
|
-
.option("--json", "JSON output")
|
|
12
|
-
.action(async (opts) => {
|
|
13
|
-
const { storeSettingsCommand } = await import("../../commands/store/index.js");
|
|
14
|
-
await storeSettingsCommand({ json: opts.json });
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
store
|
|
18
|
-
.command("update-settings")
|
|
19
|
-
.description("Update store settings")
|
|
20
|
-
.option("--slug <slug>", "Store URL slug")
|
|
21
|
-
.option("--tagline <text>", "Store tagline / description")
|
|
22
|
-
.option("--enabled <bool>", "Enable or disable store (true/false)")
|
|
23
|
-
.option("--json", "JSON output")
|
|
24
|
-
.action(async (opts) => {
|
|
25
|
-
const { storeUpdateSettingsCommand } = await import("../../commands/store/update-settings.js");
|
|
26
|
-
await storeUpdateSettingsCommand({
|
|
27
|
-
slug: opts.slug,
|
|
28
|
-
tagline: opts.tagline,
|
|
29
|
-
enabled: opts.enabled,
|
|
30
|
-
json: opts.json,
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
store
|
|
35
|
-
.command("items")
|
|
36
|
-
.description("List items available in the store")
|
|
37
|
-
.option("--json", "JSON output")
|
|
38
|
-
.option("--format <format>", "Output format: table, tsv, csv")
|
|
39
|
-
.action(async (opts) => {
|
|
40
|
-
const { storeItemsCommand } = await import("../../commands/store/items.js");
|
|
41
|
-
await storeItemsCommand({ json: opts.json, format: opts.format });
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
store
|
|
45
|
-
.command("items-toggle")
|
|
46
|
-
.description("Bulk enable / disable store items")
|
|
47
|
-
.option("--enable <ids>", "Comma-separated item IDs to enable")
|
|
48
|
-
.option("--disable <ids>", "Comma-separated item IDs to disable")
|
|
49
|
-
.option("--json", "JSON output")
|
|
50
|
-
.action(async (opts) => {
|
|
51
|
-
const { storeItemsToggleCommand } = await import("../../commands/store/items-toggle.js");
|
|
52
|
-
await storeItemsToggleCommand({
|
|
53
|
-
enable: opts.enable,
|
|
54
|
-
disable: opts.disable,
|
|
55
|
-
json: opts.json,
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
store
|
|
60
|
-
.command("orders")
|
|
61
|
-
.description("List store orders")
|
|
62
|
-
.option("--json", "JSON output")
|
|
63
|
-
.option("--status <status>", "Filter by order status")
|
|
64
|
-
.option("--page <n>", "Page number", parseInt)
|
|
65
|
-
.option("--limit <n>", "Items per page", parseInt)
|
|
66
|
-
.action(async (opts) => {
|
|
67
|
-
const { storeOrdersCommand } = await import("../../commands/store/index.js");
|
|
68
|
-
await storeOrdersCommand({
|
|
69
|
-
json: opts.json,
|
|
70
|
-
status: opts.status,
|
|
71
|
-
page: opts.page,
|
|
72
|
-
limit: opts.limit,
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
store
|
|
77
|
-
.command("order-get <id>")
|
|
78
|
-
.description("Get order details")
|
|
79
|
-
.option("--json", "JSON output")
|
|
80
|
-
.action(async (id, opts) => {
|
|
81
|
-
const { storeOrderGetCommand } = await import("../../commands/store/order-get.js");
|
|
82
|
-
await storeOrderGetCommand(id, { json: opts.json });
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
store
|
|
86
|
-
.command("order-confirm <id>")
|
|
87
|
-
.description("Confirm a pending order")
|
|
88
|
-
.option("-y, --yes", "Skip confirmation prompt")
|
|
89
|
-
.option("--json", "JSON output")
|
|
90
|
-
.action(async (id, opts) => {
|
|
91
|
-
const { storeOrderConfirmCommand } = await import("../../commands/store/order-confirm.js");
|
|
92
|
-
await storeOrderConfirmCommand(id, { json: opts.json, yes: opts.yes });
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
store
|
|
96
|
-
.command("order-cancel <id>")
|
|
97
|
-
.description("Cancel an order")
|
|
98
|
-
.option("-y, --yes", "Skip confirmation prompt")
|
|
99
|
-
.option("--reason <text>", "Cancellation reason")
|
|
100
|
-
.option("--json", "JSON output")
|
|
101
|
-
.action(async (id, opts) => {
|
|
102
|
-
const { storeOrderCancelCommand } = await import("../../commands/store/order-cancel.js");
|
|
103
|
-
await storeOrderCancelCommand(id, {
|
|
104
|
-
json: opts.json,
|
|
105
|
-
yes: opts.yes,
|
|
106
|
-
reason: opts.reason,
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
store
|
|
111
|
-
.command("order-update <id>")
|
|
112
|
-
.description("Update order status")
|
|
113
|
-
.option("--status <status>", "New status: preparing, ready, delivered")
|
|
114
|
-
.option("--json", "JSON output")
|
|
115
|
-
.action(async (id, opts) => {
|
|
116
|
-
const { storeOrderUpdateCommand } = await import("../../commands/store/order-update.js");
|
|
117
|
-
await storeOrderUpdateCommand(id, { json: opts.json, status: opts.status });
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
store
|
|
121
|
-
.command("check-slug <slug>")
|
|
122
|
-
.description("Check store slug availability")
|
|
123
|
-
.option("--json", "JSON output")
|
|
124
|
-
.action(async (slug, opts) => {
|
|
125
|
-
const { storeCheckSlugCommand } = await import("../../commands/store/check-slug.js");
|
|
126
|
-
await storeCheckSlugCommand(slug, { json: opts.json });
|
|
127
|
-
});
|
|
128
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import { targetListCommand, targetMyCommand, targetCreateCommand } from "../../commands/target/index.js";
|
|
3
|
-
|
|
4
|
-
export function registerTargetCommands(program: Command): void {
|
|
5
|
-
// ── target ────────────────────────────────────────────────────────────────
|
|
6
|
-
|
|
7
|
-
const target = program.command("target").description("Sales target management");
|
|
8
|
-
|
|
9
|
-
target
|
|
10
|
-
.command("list")
|
|
11
|
-
.description("List sales targets")
|
|
12
|
-
.option("--json", "JSON output")
|
|
13
|
-
.action(async (opts) => {
|
|
14
|
-
await targetListCommand({ json: opts.json });
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
target
|
|
18
|
-
.command("my")
|
|
19
|
-
.description("Show my target progress")
|
|
20
|
-
.option("--json", "JSON output")
|
|
21
|
-
.action(async (opts) => {
|
|
22
|
-
await targetMyCommand({ json: opts.json });
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
target
|
|
26
|
-
.command("create")
|
|
27
|
-
.description("Create a new sales target")
|
|
28
|
-
.option("--json", "JSON output")
|
|
29
|
-
.option("--type <type>", "order_count, order_value, or item_quantity")
|
|
30
|
-
.option("--period <period>", "daily, weekly, monthly, quarterly, or custom")
|
|
31
|
-
.option("--value <n>", "Target value")
|
|
32
|
-
.option("--start-date <date>", "Start date")
|
|
33
|
-
.option("--end-date <date>", "End date")
|
|
34
|
-
.option("--notes <text>", "Notes")
|
|
35
|
-
.action(async (opts) => {
|
|
36
|
-
await targetCreateCommand({
|
|
37
|
-
json: opts.json,
|
|
38
|
-
type: opts.type,
|
|
39
|
-
period: opts.period,
|
|
40
|
-
value: opts.value,
|
|
41
|
-
startDate: opts.startDate,
|
|
42
|
-
endDate: opts.endDate,
|
|
43
|
-
notes: opts.notes,
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
|
|
3
|
-
export function registerTenantCommands(program: Command): void {
|
|
4
|
-
// ── tenant ────────────────────────────────────────────────────────────────
|
|
5
|
-
|
|
6
|
-
const tenant = program.command("tenant").description("Tenant / workspace management");
|
|
7
|
-
|
|
8
|
-
tenant
|
|
9
|
-
.command("list")
|
|
10
|
-
.description("List tenants / organizations you belong to")
|
|
11
|
-
.option("--json", "JSON output")
|
|
12
|
-
.action(async (opts) => {
|
|
13
|
-
const { tenantListCommand } = await import("../../commands/tenant/list.js");
|
|
14
|
-
await tenantListCommand({ json: opts.json });
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
tenant
|
|
18
|
-
.command("members")
|
|
19
|
-
.description("List members of the current tenant")
|
|
20
|
-
.option("--json", "JSON output")
|
|
21
|
-
.option("--format <format>", "Output format: table, tsv, csv")
|
|
22
|
-
.action(async (opts) => {
|
|
23
|
-
const { tenantMembersCommand } = await import("../../commands/tenant/members.js");
|
|
24
|
-
await tenantMembersCommand({ json: opts.json, format: opts.format });
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
tenant
|
|
28
|
-
.command("invite <email>")
|
|
29
|
-
.description("Invite a user to the tenant")
|
|
30
|
-
.option("--role <role>", "Role: admin, seller_manager, seller, accountant (default: seller)")
|
|
31
|
-
.option("--json", "JSON output")
|
|
32
|
-
.action(async (email, opts) => {
|
|
33
|
-
const { tenantInviteCommand } = await import("../../commands/tenant/invite.js");
|
|
34
|
-
await tenantInviteCommand(email, { role: opts.role, json: opts.json });
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
tenant
|
|
38
|
-
.command("remove <userId>")
|
|
39
|
-
.description("Remove a member from the tenant")
|
|
40
|
-
.option("-y, --yes", "Skip confirmation")
|
|
41
|
-
.option("--json", "JSON output")
|
|
42
|
-
.action(async (userId, opts) => {
|
|
43
|
-
const { tenantRemoveCommand } = await import("../../commands/tenant/remove.js");
|
|
44
|
-
await tenantRemoveCommand(userId, { yes: opts.yes, json: opts.json });
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
tenant
|
|
48
|
-
.command("update-role <userId> <role>")
|
|
49
|
-
.description("Update a member's role (admin, seller_manager, seller, accountant)")
|
|
50
|
-
.option("--json", "JSON output")
|
|
51
|
-
.action(async (userId, role, opts) => {
|
|
52
|
-
const { tenantUpdateRoleCommand } = await import("../../commands/tenant/update-role.js");
|
|
53
|
-
await tenantUpdateRoleCommand(userId, role, { json: opts.json });
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
tenant
|
|
57
|
-
.command("invitations")
|
|
58
|
-
.description("List pending invitations")
|
|
59
|
-
.option("--json", "JSON output")
|
|
60
|
-
.action(async (opts) => {
|
|
61
|
-
const { listInvitationsCommand } = await import("../../commands/tenant/invitations.js");
|
|
62
|
-
await listInvitationsCommand(opts);
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
tenant
|
|
66
|
-
.command("revoke-invitation <invitationId>")
|
|
67
|
-
.description("Revoke a pending invitation")
|
|
68
|
-
.option("--json", "JSON output")
|
|
69
|
-
.action(async (invitationId, opts) => {
|
|
70
|
-
const { revokeInvitationCommand } = await import("../../commands/tenant/revoke-invitation.js");
|
|
71
|
-
await revokeInvitationCommand(invitationId, opts);
|
|
72
|
-
});
|
|
73
|
-
}
|