@velaro/cli 1.4.217 → 1.4.219
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/bin/velaro.js +4 -0
- package/lib/commands/apollo.js +56 -0
- package/lib/commands/automation-addon.js +27 -0
- package/package.json +1 -1
package/bin/velaro.js
CHANGED
|
@@ -74,6 +74,7 @@ import { actionsCommand } from '../lib/commands/actions.js';
|
|
|
74
74
|
import { mondayCommand } from '../lib/commands/monday.js';
|
|
75
75
|
import { makeCommand } from '../lib/commands/make.js';
|
|
76
76
|
import { notionCommand } from '../lib/commands/notion.js';
|
|
77
|
+
import { apolloCommand } from '../lib/commands/apollo.js';
|
|
77
78
|
import { callrailCommand } from '../lib/commands/callrail.js';
|
|
78
79
|
import { emailCampaignCommand } from '../lib/commands/email-campaign.js';
|
|
79
80
|
import { outboundActivityCommand } from '../lib/commands/outbound-activity.js';
|
|
@@ -148,6 +149,7 @@ import { billingInsightsGroup } from '../lib/commands/billing-insights.js';
|
|
|
148
149
|
import { supportTicketsCommand } from '../lib/commands/support-tickets.js';
|
|
149
150
|
import { aiAckGroup } from '../lib/commands/ai-ack.js';
|
|
150
151
|
import { afterHoursSupportCommand } from '../lib/commands/after-hours-support.js';
|
|
152
|
+
import { automationAddonCommand } from '../lib/commands/automation-addon.js';
|
|
151
153
|
import { startUpdateCheck } from '../lib/update-check.js';
|
|
152
154
|
import { printBanner, printBannerIfFirstRun } from '../lib/banner.js';
|
|
153
155
|
import { createRequire } from 'module';
|
|
@@ -249,6 +251,7 @@ await (registerStaffCommands ? registerStaffCommands(baseYargs) : baseYargs)
|
|
|
249
251
|
.command(mondayCommand)
|
|
250
252
|
.command(makeCommand)
|
|
251
253
|
.command(notionCommand)
|
|
254
|
+
.command(apolloCommand)
|
|
252
255
|
.command(callrailCommand)
|
|
253
256
|
.command(emailCampaignCommand)
|
|
254
257
|
.command(outboundActivityCommand)
|
|
@@ -310,6 +313,7 @@ await (registerStaffCommands ? registerStaffCommands(baseYargs) : baseYargs)
|
|
|
310
313
|
.command(supportTicketsCommand)
|
|
311
314
|
.command(aiAckGroup)
|
|
312
315
|
.command(afterHoursSupportCommand)
|
|
316
|
+
.command(automationAddonCommand)
|
|
313
317
|
.command(usageCommand)
|
|
314
318
|
.command(campaignsCommand)
|
|
315
319
|
.command(senderDomainHealthCommand)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* velaro apollo - Apollo.io prospecting connection status + ICP presets
|
|
3
|
+
*
|
|
4
|
+
* velaro apollo status Show the site's Apollo connection, monthly pull usage and last pull
|
|
5
|
+
* velaro apollo presets List the seed ICP search presets a customer can start from
|
|
6
|
+
*
|
|
7
|
+
* Read-only. Saving the API key, accepting terms and test-connection stay in the admin UI
|
|
8
|
+
* (Apollo terms acceptance must be a deliberate human action).
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { request } from '../api.js';
|
|
12
|
+
|
|
13
|
+
const GRN = '\x1b[32m';
|
|
14
|
+
const RED = '\x1b[31m';
|
|
15
|
+
const DIM = '\x1b[2m';
|
|
16
|
+
const BOLD = '\x1b[1m';
|
|
17
|
+
const RST = '\x1b[0m';
|
|
18
|
+
|
|
19
|
+
async function statusHandler() {
|
|
20
|
+
const s = await request('GET', '/Apollo/Status');
|
|
21
|
+
if (!s || !s.connected) {
|
|
22
|
+
console.log(`\n${RED}Apollo is not connected.${RST} Terms accepted: ${s?.termsAccepted ? 'yes' : 'no'}.\n`);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
console.log(`\n${BOLD}Apollo${RST} ${s.runnable ? `${GRN}connected and runnable${RST}` : `${RED}connected, not runnable${RST} (terms or target list missing)`}`);
|
|
26
|
+
console.log(` Account: ${s.accountName || DIM + '(unknown)' + RST}`);
|
|
27
|
+
console.log(` API key: ${s.apiKeyMasked || DIM + '(none)' + RST}`);
|
|
28
|
+
console.log(` Pulls this month: ${s.pullsUsedThisMonth} of ${s.monthlyPullCap} (${s.remainingThisMonth} remaining)`);
|
|
29
|
+
console.log(` Target list: ${s.targetListId ?? DIM + '(not set)' + RST}`);
|
|
30
|
+
console.log(` Terms accepted: ${s.termsAccepted ? `${s.termsAcceptedAt} by ${s.termsAcceptedBy}` : 'no'}`);
|
|
31
|
+
console.log(` Last pull: ${s.lastPullAt || DIM + '(never)' + RST} ${s.lastPullSummary || ''}`);
|
|
32
|
+
console.log(` Prospects added: ${s.totalProspectsAdded}\n`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function presetsHandler() {
|
|
36
|
+
const presets = await request('GET', '/Apollo/Presets');
|
|
37
|
+
if (!Array.isArray(presets) || presets.length === 0) {
|
|
38
|
+
console.log('\nNo presets returned.\n');
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
console.log('');
|
|
42
|
+
for (const p of presets) {
|
|
43
|
+
console.log(` ${BOLD}${p.name || p.id || '(unnamed)'}${RST}${p.description ? ` ${DIM}${p.description}${RST}` : ''}`);
|
|
44
|
+
}
|
|
45
|
+
console.log('');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const apolloCommand = {
|
|
49
|
+
command: 'apollo <subcommand>',
|
|
50
|
+
describe: 'Apollo.io prospecting connection status + ICP presets (read-only)',
|
|
51
|
+
builder: y => y
|
|
52
|
+
.command({ command: 'status', describe: "Show the site's Apollo connection and monthly pull usage", handler: statusHandler })
|
|
53
|
+
.command({ command: 'presets', describe: 'List seed ICP search presets', handler: presetsHandler })
|
|
54
|
+
.demandCommand(1, 'Specify a subcommand. Try: velaro apollo --help'),
|
|
55
|
+
handler: () => {},
|
|
56
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// velaro automation-addon: status, limits and usage of the Automation and API add-on, and pause / resume.
|
|
2
|
+
// Site scoping is server-side (token). Pausing needs a site administrator and keeps all keys, webhooks and settings.
|
|
3
|
+
import { request } from '../api.js';
|
|
4
|
+
|
|
5
|
+
function show(r) {
|
|
6
|
+
console.log(`\nAutomation and API: ${r.status}`);
|
|
7
|
+
const l = r.limits || {};
|
|
8
|
+
console.log(`API keys: ${l.maxApiKeys || 'unlimited'}`);
|
|
9
|
+
console.log(`API calls per month: ${l.maxApiCallsPerMonth || 'unlimited'}`);
|
|
10
|
+
console.log(`Webhook subscriptions: ${l.maxWebhookEndpoints || 'unlimited'}`);
|
|
11
|
+
console.log(`Webhook calls / month: ${l.maxWebhookInvocationsPerMonth || 'unlimited'}`);
|
|
12
|
+
console.log(`Workflow triggers / mo: ${l.maxWorkflowTriggersPerMonth || 'unlimited'}`);
|
|
13
|
+
for (const u of r.usage || []) console.log(` ${u.label}: ${u.used}${u.limit ? ' of ' + u.limit : ''}`);
|
|
14
|
+
console.log('');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const automationAddonCommand = {
|
|
18
|
+
command: 'automation-addon <subcommand>',
|
|
19
|
+
describe: 'Automation and API add-on: status, pause, resume',
|
|
20
|
+
builder: (yargs) =>
|
|
21
|
+
yargs
|
|
22
|
+
.command('get', 'Show status, limits and usage', {}, async () => show(await request('GET', 'AutomationAddon')))
|
|
23
|
+
.command('pause', 'Pause the add-on (keeps all configuration)', {}, async () => show(await request('PUT', 'AutomationAddon', { enabled: false })))
|
|
24
|
+
.command('resume', 'Resume the add-on', {}, async () => show(await request('PUT', 'AutomationAddon', { enabled: true })))
|
|
25
|
+
.demandCommand(1, 'Specify a subcommand: get | pause | resume'),
|
|
26
|
+
handler: () => {},
|
|
27
|
+
};
|
package/package.json
CHANGED