@velaro/cli 1.4.167 → 1.4.169
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 +2 -0
- package/lib/commands/after-hours-support.js +22 -0
- package/package.json +1 -1
package/bin/velaro.js
CHANGED
|
@@ -127,6 +127,7 @@ import { aiFollowupsCommand, businessActionCommand, callCommand, conversationCom
|
|
|
127
127
|
import { featureDiscoveryGroup } from '../lib/commands/feature-discovery.js';
|
|
128
128
|
import { billingInsightsGroup } from '../lib/commands/billing-insights.js';
|
|
129
129
|
import { supportTicketsCommand } from '../lib/commands/support-tickets.js';
|
|
130
|
+
import { afterHoursSupportCommand } from '../lib/commands/after-hours-support.js';
|
|
130
131
|
import { startUpdateCheck } from '../lib/update-check.js';
|
|
131
132
|
import { printBanner, printBannerIfFirstRun } from '../lib/banner.js';
|
|
132
133
|
import { createRequire } from 'module';
|
|
@@ -273,6 +274,7 @@ await (registerStaffCommands ? registerStaffCommands(baseYargs) : baseYargs)
|
|
|
273
274
|
.command(featureDiscoveryGroup)
|
|
274
275
|
.command(billingInsightsGroup)
|
|
275
276
|
.command(supportTicketsCommand)
|
|
277
|
+
.command(afterHoursSupportCommand)
|
|
276
278
|
.command(usageCommand)
|
|
277
279
|
.command(campaignsCommand)
|
|
278
280
|
.command(senderDomainHealthCommand)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// velaro after-hours-support: this month's after-hours premium support code for your site.
|
|
2
|
+
// Site scoping is server-side (token); no siteId is ever passed. Site administrators only, and only when your plan includes it.
|
|
3
|
+
import { request } from '../api.js';
|
|
4
|
+
|
|
5
|
+
async function get() {
|
|
6
|
+
const r = await request('GET', 'AfterHoursSupport/my');
|
|
7
|
+
console.log(`\nAfter-hours support code for ${r.periodMonth}: ${r.displayCode}`);
|
|
8
|
+
console.log(`Valid until: ${r.validToUtc}`);
|
|
9
|
+
console.log(`Status: ${r.status}`);
|
|
10
|
+
console.log(`Uses so far: ${r.usedCount} of ${r.maxUses}`);
|
|
11
|
+
console.log('\nRead this code to Velaro support outside business hours, after you have been verified.\n');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const afterHoursSupportCommand = {
|
|
15
|
+
command: 'after-hours-support <subcommand>',
|
|
16
|
+
describe: 'Your after-hours premium support code',
|
|
17
|
+
builder: (yargs) =>
|
|
18
|
+
yargs
|
|
19
|
+
.command('get', 'Show this month\'s after-hours support code', {}, () => get())
|
|
20
|
+
.demandCommand(1, 'Specify a subcommand: get'),
|
|
21
|
+
handler: () => {},
|
|
22
|
+
};
|
package/package.json
CHANGED