argorant 0.14.0 → 0.14.1
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/README.md +6 -4
- package/bin/argorant.js +10 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -252,10 +252,12 @@ npx argorant webhooks rm 3 --yes
|
|
|
252
252
|
```
|
|
253
253
|
|
|
254
254
|
`credits buy` shows the quote first and only buys after a yes: at a terminal it asks, anywhere
|
|
255
|
-
else it needs `--yes`.
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
255
|
+
else it needs `--yes`. An agent that runs the CLI for someone passes that person's own words with
|
|
256
|
+
`--confirmation "yes, buy 5,000 credits"`; every purchase records how it was confirmed. When the
|
|
257
|
+
account owner allowed purchases with the saved card in Settings > Billing (up to a monthly limit)
|
|
258
|
+
and the purchase fits, that card is charged right away. Otherwise you get a payment link to pay
|
|
259
|
+
yourself, and the credits are added once the payment goes through. `--pay-with link` always gives
|
|
260
|
+
the link. Bought credits stay valid for 365 days.
|
|
259
261
|
|
|
260
262
|
`lists rm` and `webhooks rm` work the same way: they ask at a terminal and need `--yes` anywhere
|
|
261
263
|
else. A webhook's signing secret is shown once, when you add it.
|
package/bin/argorant.js
CHANGED
|
@@ -3434,8 +3434,9 @@ async function cmdCredits(argv) {
|
|
|
3434
3434
|
return console.log(`
|
|
3435
3435
|
${bold("argorant credits")} packs ${dim("the credit packs and their prices")}
|
|
3436
3436
|
${bold("argorant credits")} quote <credits> ${dim("a price quote for one pack; nothing is bought")}
|
|
3437
|
-
${bold("argorant credits")} buy <credits> [--pay-with link] [--yes]
|
|
3438
|
-
${dim("shows the quote, asks, then charges the saved card (when
|
|
3437
|
+
${bold("argorant credits")} buy <credits> [--pay-with link] [--yes] [--confirmation "<the user's yes>"]
|
|
3438
|
+
${dim("shows the quote, asks, then charges the saved card (when the account owner allowed it, up to a monthly limit) or gives you a payment link")}
|
|
3439
|
+
${dim("every purchase records its confirmation: your answer at the prompt, or the words passed with --confirmation")}
|
|
3439
3440
|
${bold("argorant credits")} purchases [<id>] ${dim("purchases made with this account")}
|
|
3440
3441
|
${dim("1 credit = 1 valid contact; 0.5 credit = 1 email check. Bought credits stay valid for 365 days.")}
|
|
3441
3442
|
`);
|
|
@@ -3452,7 +3453,7 @@ ${dim("1 credit = 1 valid contact; 0.5 credit = 1 email check. Bought credits st
|
|
|
3452
3453
|
return;
|
|
3453
3454
|
}
|
|
3454
3455
|
if (sub === "quote" || sub === "buy") {
|
|
3455
|
-
const args = readFlags(rest, { "--currency": "currency", "--pay-with": "payWith" });
|
|
3456
|
+
const args = readFlags(rest, { "--currency": "currency", "--pay-with": "payWith", "--confirmation": "confirmation" });
|
|
3456
3457
|
const credits = parseLimit(String(args._[0] || "").replace(/[,_]/g, "") || "x", "credits");
|
|
3457
3458
|
const body = { credits };
|
|
3458
3459
|
if (args.currency) body.currency = String(args.currency).toLowerCase();
|
|
@@ -3468,9 +3469,14 @@ ${dim("1 credit = 1 valid contact; 0.5 credit = 1 email check. Bought credits st
|
|
|
3468
3469
|
if (!args.json) for (const l of quoteLines(q)) console.log(l);
|
|
3469
3470
|
const card = q.payment && q.payment.saved_card;
|
|
3470
3471
|
const how = payWith !== "link" && card && card.usable ? `The saved ${card.card || "card"} is charged now.` : "You get a payment link; nothing is charged before you pay it.";
|
|
3471
|
-
|
|
3472
|
+
const question = `Buy ${credits.toLocaleString()} credits for ${fmtPrice(q.price_cents !== undefined || q.amount_cents !== undefined ? q : q.pack || q, q.currency)}? ${how}`;
|
|
3473
|
+
if (!(await confirmOrDie(args, question, "Buying credits needs a confirmation."))) return;
|
|
3472
3474
|
const pbody = { quote_id: q.quote_id, confirmed: true };
|
|
3473
3475
|
if (payWith !== "auto") pbody.pay_with = payWith;
|
|
3476
|
+
// The purchase records how it was confirmed (2026-10-07): the user's own words when an agent passes them,
|
|
3477
|
+
// the answer at the prompt, or nothing extra with --yes (the record then says confirmed=true).
|
|
3478
|
+
const said = args.confirmation ? String(args.confirmation) : !args.yes ? `Answered yes at the terminal to: ${question}` : "";
|
|
3479
|
+
if (said.trim()) pbody.user_confirmation = said.replace(/\s+/g, " ").trim().slice(0, 1000);
|
|
3474
3480
|
const r = need(await request("POST", args.base, `${V1}/credits/purchases`, { key, body: pbody }), "credit purchase");
|
|
3475
3481
|
if (args.json) return console.log(JSON.stringify({ quote: q, purchase: r }, null, 2));
|
|
3476
3482
|
const p = r.purchase && typeof r.purchase === "object" ? { ...r.purchase, ...r } : r;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "argorant",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "Search, count, reveal, export, and verify B2B contacts from the Argorant database, and find work emails by name and company domain, from your terminal, scripts, or coding agent.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"argorant": "bin/argorant.js"
|