@forjio/storlaunch-cli 0.5.0 → 0.6.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/payouts.d.ts +4 -0
- package/dist/commands/payouts.d.ts.map +1 -0
- package/dist/commands/payouts.js +208 -0
- package/dist/commands/payouts.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":"payouts.d.ts","sourceRoot":"","sources":["../../src/commands/payouts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+EpC,QAAA,MAAM,OAAO,SAAgE,CAAC;AA8H9E,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,208 @@
|
|
|
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 payouts` — withdraw funds to the merchant bank. Manual mode for
|
|
7
|
+
* now (platform operator wires money + marks paid). Commands mirror the
|
|
8
|
+
* REST routes at /api/v1/payouts/*.
|
|
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
|
+
}
|
|
17
|
+
return 1;
|
|
18
|
+
}
|
|
19
|
+
function handleError(err, json) {
|
|
20
|
+
if (json && err instanceof ApiClientError) {
|
|
21
|
+
console.error(JSON.stringify({ data: null, error: { code: err.code, message: err.message } }, null, 2));
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
console.error(chalk.red(`Error: ${err instanceof Error ? err.message : String(err)}`));
|
|
25
|
+
}
|
|
26
|
+
process.exit(getExitCode(err));
|
|
27
|
+
}
|
|
28
|
+
// ─── Bank account ────────────────────────────────────────────
|
|
29
|
+
const bankAccount = new Command("bank-account").description("Default payout bank account");
|
|
30
|
+
bankAccount
|
|
31
|
+
.command("get")
|
|
32
|
+
.description("Show the current default bank account")
|
|
33
|
+
.action(async (_opts, cmd) => {
|
|
34
|
+
const g = cmd.optsWithGlobals();
|
|
35
|
+
try {
|
|
36
|
+
const result = await apiRequest("/payouts/bank-account", {
|
|
37
|
+
sandbox: g.sandbox,
|
|
38
|
+
});
|
|
39
|
+
output(result, { json: g.json });
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
handleError(err, g.json);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
bankAccount
|
|
46
|
+
.command("set")
|
|
47
|
+
.description("Set the default bank account")
|
|
48
|
+
.requiredOption("--name <name>", "Bank name (e.g. 'Bank Central Asia')")
|
|
49
|
+
.requiredOption("--number <number>", "Bank account number")
|
|
50
|
+
.requiredOption("--holder <name>", "Account holder name (as on passbook)")
|
|
51
|
+
.option("--code <code>", "Bank code (e.g. BCA, MANDIRI, BNI)")
|
|
52
|
+
.action(async (opts, cmd) => {
|
|
53
|
+
const g = cmd.optsWithGlobals();
|
|
54
|
+
try {
|
|
55
|
+
const result = await apiRequest("/payouts/bank-account", {
|
|
56
|
+
method: "PATCH",
|
|
57
|
+
body: {
|
|
58
|
+
bankName: opts.name,
|
|
59
|
+
bankAccountNumber: opts.number,
|
|
60
|
+
bankAccountHolder: opts.holder,
|
|
61
|
+
bankCode: opts.code ?? null,
|
|
62
|
+
},
|
|
63
|
+
sandbox: g.sandbox,
|
|
64
|
+
});
|
|
65
|
+
if (g.json) {
|
|
66
|
+
output(result, { json: true });
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
console.log(chalk.green(`Bank account saved: ${opts.name} · ${opts.number} · ${opts.holder}`));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
handleError(err, g.json);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
// ─── Payouts ─────────────────────────────────────────────────
|
|
77
|
+
const payouts = new Command("payouts").description("Manage merchant payouts");
|
|
78
|
+
payouts.addCommand(bankAccount);
|
|
79
|
+
payouts
|
|
80
|
+
.command("balance")
|
|
81
|
+
.description("Show available payout balance (ledger − in-flight)")
|
|
82
|
+
.action(async (_opts, cmd) => {
|
|
83
|
+
const g = cmd.optsWithGlobals();
|
|
84
|
+
try {
|
|
85
|
+
const result = await apiRequest("/payouts/balance", {
|
|
86
|
+
sandbox: g.sandbox,
|
|
87
|
+
});
|
|
88
|
+
output(result, { json: g.json });
|
|
89
|
+
}
|
|
90
|
+
catch (err) {
|
|
91
|
+
handleError(err, g.json);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
payouts
|
|
95
|
+
.command("list")
|
|
96
|
+
.description("List payouts")
|
|
97
|
+
.option("--status <status>", "Filter: pending | in_transit | paid | failed | cancelled")
|
|
98
|
+
.option("--limit <n>", "Items per page", parseInt)
|
|
99
|
+
.option("--cursor <cursor>", "Pagination cursor")
|
|
100
|
+
.action(async (opts, cmd) => {
|
|
101
|
+
const g = cmd.optsWithGlobals();
|
|
102
|
+
try {
|
|
103
|
+
const result = await apiRequest("/payouts", {
|
|
104
|
+
query: { status: opts.status, limit: opts.limit, cursor: opts.cursor },
|
|
105
|
+
sandbox: g.sandbox,
|
|
106
|
+
});
|
|
107
|
+
if (g.json) {
|
|
108
|
+
output(result, { json: true });
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
const cols = [
|
|
112
|
+
{ key: "id", header: "ID", width: 24 },
|
|
113
|
+
{ key: "requestedAt", header: "Requested", width: 20 },
|
|
114
|
+
{ key: "amount", header: "Amount" },
|
|
115
|
+
{ key: "currency", header: "Ccy" },
|
|
116
|
+
{ key: "status", header: "Status", width: 12 },
|
|
117
|
+
{ key: "bankName", header: "Bank", width: 16 },
|
|
118
|
+
{ key: "reference", header: "Ref", width: 16 },
|
|
119
|
+
];
|
|
120
|
+
output((result["data"] ?? result), { columns: cols });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
catch (err) {
|
|
124
|
+
handleError(err, g.json);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
payouts
|
|
128
|
+
.command("get <id>")
|
|
129
|
+
.description("Get a single payout")
|
|
130
|
+
.action(async (id, _opts, cmd) => {
|
|
131
|
+
const g = cmd.optsWithGlobals();
|
|
132
|
+
try {
|
|
133
|
+
const result = await apiRequest(`/payouts/${id}`, {
|
|
134
|
+
sandbox: g.sandbox,
|
|
135
|
+
});
|
|
136
|
+
output(result, { json: g.json });
|
|
137
|
+
}
|
|
138
|
+
catch (err) {
|
|
139
|
+
handleError(err, g.json);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
payouts
|
|
143
|
+
.command("create")
|
|
144
|
+
.description("Request a new payout (uses default bank unless override passed)")
|
|
145
|
+
.requiredOption("--amount <n>", "Amount in smallest currency unit", parseInt)
|
|
146
|
+
.requiredOption("--currency <code>", "Currency code (IDR, USD)")
|
|
147
|
+
.option("--note <text>", "Free-text note on the payout")
|
|
148
|
+
.option("--bank-name <name>", "Override default bank name for this payout")
|
|
149
|
+
.option("--bank-number <number>", "Override default bank account number")
|
|
150
|
+
.option("--bank-holder <name>", "Override default account holder")
|
|
151
|
+
.option("--bank-code <code>", "Override default bank code")
|
|
152
|
+
.action(async (opts, cmd) => {
|
|
153
|
+
const g = cmd.optsWithGlobals();
|
|
154
|
+
try {
|
|
155
|
+
const body = {
|
|
156
|
+
amount: opts.amount,
|
|
157
|
+
currency: opts.currency,
|
|
158
|
+
};
|
|
159
|
+
if (opts.note)
|
|
160
|
+
body["note"] = opts.note;
|
|
161
|
+
if (opts.bankName)
|
|
162
|
+
body["bankName"] = opts.bankName;
|
|
163
|
+
if (opts.bankNumber)
|
|
164
|
+
body["bankAccountNumber"] = opts.bankNumber;
|
|
165
|
+
if (opts.bankHolder)
|
|
166
|
+
body["bankAccountHolder"] = opts.bankHolder;
|
|
167
|
+
if (opts.bankCode)
|
|
168
|
+
body["bankCode"] = opts.bankCode;
|
|
169
|
+
const result = await apiRequest("/payouts", {
|
|
170
|
+
method: "POST",
|
|
171
|
+
body,
|
|
172
|
+
sandbox: g.sandbox,
|
|
173
|
+
});
|
|
174
|
+
if (g.json) {
|
|
175
|
+
output(result, { json: true });
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
const d = (result["data"] ?? result);
|
|
179
|
+
console.log(chalk.green(`Payout requested: ${String(d["id"])} (status: ${d["status"]})`));
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
catch (err) {
|
|
183
|
+
handleError(err, g.json);
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
payouts
|
|
187
|
+
.command("cancel <id>")
|
|
188
|
+
.description("Cancel a pending payout (fails if already processing)")
|
|
189
|
+
.action(async (id, _opts, cmd) => {
|
|
190
|
+
const g = cmd.optsWithGlobals();
|
|
191
|
+
try {
|
|
192
|
+
const result = await apiRequest(`/payouts/${id}/cancel`, {
|
|
193
|
+
method: "POST",
|
|
194
|
+
sandbox: g.sandbox,
|
|
195
|
+
});
|
|
196
|
+
if (g.json) {
|
|
197
|
+
output(result, { json: true });
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
console.log(chalk.green(`Payout ${id} cancelled.`));
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
catch (err) {
|
|
204
|
+
handleError(err, g.json);
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
export { payouts };
|
|
208
|
+
//# sourceMappingURL=payouts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payouts.js","sourceRoot":"","sources":["../../src/commands/payouts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA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;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,aAAa,CAAC;KACtB,WAAW,CAAC,uDAAuD,CAAC;KACpE,MAAM,CAAC,KAAK,EAAE,EAAU,EAAE,KAAK,EAAE,GAAY,EAAE,EAAE;IAChD,MAAM,CAAC,GAAG,GAAG,CAAC,eAAe,EAAyC,CAAC;IACvE,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAA0B,YAAY,EAAE,SAAS,EAAE;YAChF,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,CAAC,CAAC,OAAO;SACnB,CAAC,CAAC;QACH,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;YACX,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;QACtD,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,OAAO,EAAE,OAAO,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;AAYpC;;;;GAIG;AACH,eAAO,MAAM,IAAI,SAAoF,CAAC"}
|
package/dist/commands/sell.js
CHANGED
|
@@ -8,6 +8,7 @@ import { inventory } from "./inventory.js";
|
|
|
8
8
|
import { shipping } from "./shipping.js";
|
|
9
9
|
import { ledger } from "./ledger.js";
|
|
10
10
|
import { reports } from "./reports.js";
|
|
11
|
+
import { payouts } from "./payouts.js";
|
|
11
12
|
/**
|
|
12
13
|
* `sell` — seller-side commands. Wraps existing command modules as
|
|
13
14
|
* subcommands. 0.3.0 adds inventory (variants/warehouses/stock) and
|
|
@@ -21,6 +22,7 @@ sell.addCommand(inventory);
|
|
|
21
22
|
sell.addCommand(shipping);
|
|
22
23
|
sell.addCommand(ledger);
|
|
23
24
|
sell.addCommand(reports);
|
|
25
|
+
sell.addCommand(payouts);
|
|
24
26
|
sell.addCommand(webhook);
|
|
25
27
|
sell.addCommand(config);
|
|
26
28
|
//# 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;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,C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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,OAAO,CAAC,CAAC;AACzB,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, ledger, reports, payments, webhooks) and buyer tools (shop, orders, subs, invoices) in one CLI",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Storlaunch CLI — seller tools (storefronts, inventory, shipping, ledger, reports, payouts, 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": {
|