@forjio/storlaunch-cli 0.3.0 → 0.4.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.
- package/dist/commands/ledger.d.ts +4 -0
- package/dist/commands/ledger.d.ts.map +1 -0
- package/dist/commands/ledger.js +178 -0
- package/dist/commands/ledger.js.map +1 -0
- package/dist/commands/sell.d.ts.map +1 -1
- package/dist/commands/sell.js +2 -0
- package/dist/commands/sell.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ledger.d.ts","sourceRoot":"","sources":["../../src/commands/ledger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsLpC,QAAA,MAAM,MAAM,SAAwG,CAAC;AAMrH,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { apiRequest, ApiClientError } from "../lib/api.js";
|
|
4
|
+
import { output } from "../lib/output.js";
|
|
5
|
+
/**
|
|
6
|
+
* `sell ledger` — per-merchant running money log. Fronts /ledger/*:
|
|
7
|
+
* entries list/get, account balance, per-customer balance, manual
|
|
8
|
+
* adjustments.
|
|
9
|
+
*/
|
|
10
|
+
function getExitCode(err) {
|
|
11
|
+
if (err instanceof ApiClientError) {
|
|
12
|
+
if (err.status === 401 || err.status === 403)
|
|
13
|
+
return 2;
|
|
14
|
+
if (err.status === 429)
|
|
15
|
+
return 3;
|
|
16
|
+
if (err.code === "QUOTA_EXCEEDED")
|
|
17
|
+
return 4;
|
|
18
|
+
}
|
|
19
|
+
return 1;
|
|
20
|
+
}
|
|
21
|
+
function handleError(err, json) {
|
|
22
|
+
if (json && err instanceof ApiClientError) {
|
|
23
|
+
console.error(JSON.stringify({ data: null, error: { code: err.code, message: err.message } }, null, 2));
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
console.error(chalk.red(`Error: ${err instanceof Error ? err.message : String(err)}`));
|
|
27
|
+
}
|
|
28
|
+
process.exit(getExitCode(err));
|
|
29
|
+
}
|
|
30
|
+
// ─── Entries ─────────────────────────────────────────────────
|
|
31
|
+
const entries = new Command("entries").description("List / inspect ledger entries");
|
|
32
|
+
entries
|
|
33
|
+
.command("list")
|
|
34
|
+
.description("List ledger entries (most recent first)")
|
|
35
|
+
.option("--type <type>", "Filter: credit | debit")
|
|
36
|
+
.option("--category <category>", "Filter: sale | refund | platform_fee | channel_fee | shipping_cost | shipping_refund | payout | adjustment")
|
|
37
|
+
.option("--customer <id>", "Filter by customer ID")
|
|
38
|
+
.option("--source-type <type>", "Filter by source (checkout_session, shipment, subscription, etc.)")
|
|
39
|
+
.option("--source-id <id>", "Filter by source record ID")
|
|
40
|
+
.option("--from <iso>", "Filter: entries on/after this datetime (ISO-8601)")
|
|
41
|
+
.option("--to <iso>", "Filter: entries on/before this datetime (ISO-8601)")
|
|
42
|
+
.option("--cursor <cursor>", "Pagination cursor")
|
|
43
|
+
.option("--limit <n>", "Items per page (max 100)", parseInt)
|
|
44
|
+
.action(async (opts, cmd) => {
|
|
45
|
+
const g = cmd.optsWithGlobals();
|
|
46
|
+
try {
|
|
47
|
+
const result = await apiRequest("/ledger/entries", {
|
|
48
|
+
query: {
|
|
49
|
+
type: opts.type,
|
|
50
|
+
category: opts.category,
|
|
51
|
+
customerId: opts.customer,
|
|
52
|
+
sourceType: opts.sourceType,
|
|
53
|
+
sourceId: opts.sourceId,
|
|
54
|
+
from: opts.from,
|
|
55
|
+
to: opts.to,
|
|
56
|
+
cursor: opts.cursor,
|
|
57
|
+
limit: opts.limit,
|
|
58
|
+
},
|
|
59
|
+
sandbox: g.sandbox,
|
|
60
|
+
});
|
|
61
|
+
if (g.json) {
|
|
62
|
+
output(result, { json: true });
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
const cols = [
|
|
66
|
+
{ key: "createdAt", header: "When", width: 20 },
|
|
67
|
+
{ key: "category", header: "Category", width: 16 },
|
|
68
|
+
{ key: "type", header: "Dir", width: 6 },
|
|
69
|
+
{ key: "amount", header: "Amount" },
|
|
70
|
+
{ key: "currency", header: "Ccy" },
|
|
71
|
+
{ key: "balanceAfter", header: "Balance" },
|
|
72
|
+
{ key: "description", header: "Description", width: 36 },
|
|
73
|
+
];
|
|
74
|
+
output((result["data"] ?? result), { columns: cols });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
handleError(err, g.json);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
entries
|
|
82
|
+
.command("get <id>")
|
|
83
|
+
.description("Get a single ledger entry by ID")
|
|
84
|
+
.action(async (id, _opts, cmd) => {
|
|
85
|
+
const g = cmd.optsWithGlobals();
|
|
86
|
+
try {
|
|
87
|
+
const result = await apiRequest(`/ledger/entries/${id}`, {
|
|
88
|
+
sandbox: g.sandbox,
|
|
89
|
+
});
|
|
90
|
+
output(result, { json: g.json });
|
|
91
|
+
}
|
|
92
|
+
catch (err) {
|
|
93
|
+
handleError(err, g.json);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
// ─── Balance ─────────────────────────────────────────────────
|
|
97
|
+
const balance = new Command("balance").description("Running balance (account-wide or per customer)");
|
|
98
|
+
balance
|
|
99
|
+
.command("account")
|
|
100
|
+
.description("Current running balance for the merchant account")
|
|
101
|
+
.action(async (_opts, cmd) => {
|
|
102
|
+
const g = cmd.optsWithGlobals();
|
|
103
|
+
try {
|
|
104
|
+
const result = await apiRequest("/ledger/balance", {
|
|
105
|
+
sandbox: g.sandbox,
|
|
106
|
+
});
|
|
107
|
+
output(result, { json: g.json });
|
|
108
|
+
}
|
|
109
|
+
catch (err) {
|
|
110
|
+
handleError(err, g.json);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
balance
|
|
114
|
+
.command("customer <customerId>")
|
|
115
|
+
.description("Running AR balance for a specific customer")
|
|
116
|
+
.action(async (customerId, _opts, cmd) => {
|
|
117
|
+
const g = cmd.optsWithGlobals();
|
|
118
|
+
try {
|
|
119
|
+
const result = await apiRequest(`/ledger/balance/customers/${customerId}`, { sandbox: g.sandbox });
|
|
120
|
+
output(result, { json: g.json });
|
|
121
|
+
}
|
|
122
|
+
catch (err) {
|
|
123
|
+
handleError(err, g.json);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
// ─── Adjustments ─────────────────────────────────────────────
|
|
127
|
+
const adjustments = new Command("adjustments").description("Manual ledger adjustments (credits, debits, write-offs)");
|
|
128
|
+
adjustments
|
|
129
|
+
.command("create")
|
|
130
|
+
.description("Post a manual adjustment entry")
|
|
131
|
+
.requiredOption("--type <type>", "credit (incoming) or debit (outgoing)")
|
|
132
|
+
.requiredOption("--amount <n>", "Positive amount in smallest currency unit", parseInt)
|
|
133
|
+
.requiredOption("--currency <code>", "Currency code (IDR, USD)")
|
|
134
|
+
.requiredOption("--description <text>", "Free-text reason (audit trail)")
|
|
135
|
+
.option("--customer <id>", "Associate with a customer (AR)")
|
|
136
|
+
.option("--transaction-id <key>", "Custom idempotency key (auto-generated if omitted)")
|
|
137
|
+
.action(async (opts, cmd) => {
|
|
138
|
+
const g = cmd.optsWithGlobals();
|
|
139
|
+
try {
|
|
140
|
+
const body = {
|
|
141
|
+
type: opts.type,
|
|
142
|
+
amount: opts.amount,
|
|
143
|
+
currency: opts.currency,
|
|
144
|
+
description: opts.description,
|
|
145
|
+
};
|
|
146
|
+
if (opts.customer)
|
|
147
|
+
body["customerId"] = opts.customer;
|
|
148
|
+
if (opts.transactionId)
|
|
149
|
+
body["transactionId"] = opts.transactionId;
|
|
150
|
+
const result = await apiRequest("/ledger/adjustments", {
|
|
151
|
+
method: "POST",
|
|
152
|
+
body,
|
|
153
|
+
sandbox: g.sandbox,
|
|
154
|
+
});
|
|
155
|
+
if (g.json) {
|
|
156
|
+
output(result, { json: true });
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
const data = (result["data"] ?? result);
|
|
160
|
+
const sign = opts.type === "credit" ? "+" : "-";
|
|
161
|
+
console.log(chalk.green(`Posted: ${sign}${opts.amount} ${opts.currency} — ${opts.description}`));
|
|
162
|
+
if (data["id"])
|
|
163
|
+
console.log(chalk.dim(`ID: ${String(data["id"])}`));
|
|
164
|
+
if (data["balanceAfter"] !== undefined)
|
|
165
|
+
console.log(chalk.dim(`Balance: ${data["balanceAfter"]} ${opts.currency}`));
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
catch (err) {
|
|
169
|
+
handleError(err, g.json);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
// ─── Top-level ───────────────────────────────────────────────
|
|
173
|
+
const ledger = new Command("ledger").description("Per-merchant ledger — sales, refunds, fees, payouts, adjustments");
|
|
174
|
+
ledger.addCommand(entries);
|
|
175
|
+
ledger.addCommand(balance);
|
|
176
|
+
ledger.addCommand(adjustments);
|
|
177
|
+
export { ledger };
|
|
178
|
+
//# sourceMappingURL=ledger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ledger.js","sourceRoot":"","sources":["../../src/commands/ledger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAe,MAAM,kBAAkB,CAAC;AAEvD;;;;GAIG;AAEH,SAAS,WAAW,CAAC,GAAY;IAC/B,IAAI,GAAG,YAAY,cAAc,EAAE,CAAC;QAClC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;YAAE,OAAO,CAAC,CAAC;QACvD,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;YAAE,OAAO,CAAC,CAAC;QACjC,IAAI,GAAG,CA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,KAAK,CAAC,WAAW,IAAI,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;YACjG,IAAI,IAAI,CAAC,IAAI,CAAC;gBAAE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACpE,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,SAAS;gBAAE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QACtH,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,gEAAgE;AAEhE,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,kEAAkE,CAAC,CAAC;AAErH,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAC3B,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAC3B,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sell.d.ts","sourceRoot":"","sources":["../../src/commands/sell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"sell.d.ts","sourceRoot":"","sources":["../../src/commands/sell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC;;;;GAIG;AACH,eAAO,MAAM,IAAI,SAAoF,CAAC"}
|
package/dist/commands/sell.js
CHANGED
|
@@ -6,6 +6,7 @@ import { webhook } from "./webhook.js";
|
|
|
6
6
|
import { config } from "./config.js";
|
|
7
7
|
import { inventory } from "./inventory.js";
|
|
8
8
|
import { shipping } from "./shipping.js";
|
|
9
|
+
import { ledger } from "./ledger.js";
|
|
9
10
|
/**
|
|
10
11
|
* `sell` — seller-side commands. Wraps existing command modules as
|
|
11
12
|
* subcommands. 0.3.0 adds inventory (variants/warehouses/stock) and
|
|
@@ -17,6 +18,7 @@ sell.addCommand(payment);
|
|
|
17
18
|
sell.addCommand(storefront);
|
|
18
19
|
sell.addCommand(inventory);
|
|
19
20
|
sell.addCommand(shipping);
|
|
21
|
+
sell.addCommand(ledger);
|
|
20
22
|
sell.addCommand(webhook);
|
|
21
23
|
sell.addCommand(config);
|
|
22
24
|
//# sourceMappingURL=sell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sell.js","sourceRoot":"","sources":["../../src/commands/sell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"sell.js","sourceRoot":"","sources":["../../src/commands/sell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,gDAAgD,CAAC,CAAC;AAEtG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AACtB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACzB,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAC5B,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AAC3B,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC1B,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AACxB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACzB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forjio/storlaunch-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Storlaunch CLI — seller tools (storefronts, inventory, shipping, payments, webhooks) and buyer tools (shop, orders, subs, invoices) in one CLI",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Storlaunch CLI — seller tools (storefronts, inventory, shipping, ledger, payments, webhooks) and buyer tools (shop, orders, subs, invoices) in one CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|