@velaro/cli 1.4.252 → 1.4.254

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.
Files changed (2) hide show
  1. package/lib/commands/kb.js +35 -0
  2. package/package.json +1 -1
@@ -19,6 +19,7 @@ export const kbCommand = {
19
19
  .command(overrideCommand)
20
20
  .command(contentCommand)
21
21
  .command(settingsCommand)
22
+ .command(domainCommand)
22
23
  .command(statusCommand)
23
24
  .command(tenantCommand)
24
25
  .demandCommand(1, 'Specify a subcommand: article, qna, override, content, reindex, settings, status, swap-connection, tenant'),
@@ -82,6 +83,40 @@ const statusCommand = {
82
83
  // Settings — branding, domain, layout, SEO/analytics
83
84
  // ────────────────────────────────────────────────────────────────────────────
84
85
 
86
+ const domainCommand = {
87
+ command: 'domain <subcommand>',
88
+ describe: 'Your help center custom domain: get, set, verify',
89
+ builder: (yargs) =>
90
+ yargs
91
+ .command({
92
+ command: 'get', describe: 'Show your custom domain, its status and the CNAME target',
93
+ handler: runCommand(async () => { console.log(JSON.stringify(await get('/api/kb/settings/domain'), null, 2)); }),
94
+ })
95
+ .command({
96
+ command: 'set <domain>', describe: 'Set your custom domain, e.g. help.acme.com. Pass "" to clear.',
97
+ builder: (y) => y.positional('domain', { type: 'string' }),
98
+ handler: runCommand(async (argv) => {
99
+ const c = await get('/api/kb/settings');
100
+ await post('/api/kb/settings', {
101
+ companyName: c.companyName ?? '', themeColor: c.themeColor ?? '', themePreset: c.themePreset ?? null,
102
+ headerText: c.headerText ?? '', returnLinkText: c.returnLinkText ?? '', returnLinkUrl: c.returnLinkUrl ?? '',
103
+ logoUrl: c.logoUrl ?? '', domain: String(argv.domain ?? '').trim(), topicLayout: c.topicLayout ?? 'grid',
104
+ articleLayout: c.articleLayout ?? 'table', showLastUpdated: c.showLastUpdated ?? true,
105
+ enableLiveChat: c.enableLiveChat ?? false, liveChatGroupId: c.liveChatGroupId ?? 0,
106
+ enableKbBot: c.enableKbBot ?? false, kbChatWindowId: c.kbChatWindowId ?? 0,
107
+ seoMetaDescription: c.seoMetaDescription ?? '', ga4MeasurementId: c.ga4MeasurementId ?? '',
108
+ });
109
+ console.log(JSON.stringify(await get('/api/kb/settings/domain'), null, 2));
110
+ }),
111
+ })
112
+ .command({
113
+ command: 'verify', describe: 'Check now whether your domain resolves to Velaro',
114
+ handler: runCommand(async () => { console.log(JSON.stringify(await post('/api/kb/settings/domain/verify', {}), null, 2)); }),
115
+ })
116
+ .demandCommand(1, 'Specify: get, set, verify'),
117
+ handler: () => {},
118
+ };
119
+
85
120
  const settingsCommand = {
86
121
  command: 'settings <subcommand>',
87
122
  describe: 'View or update Knowledge Base settings (branding, domain, layout, SEO/analytics)',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velaro/cli",
3
- "version": "1.4.252",
3
+ "version": "1.4.254",
4
4
  "description": "Velaro Workspace v20 — command-line interface for managing bots, knowledge base ingestion, MCP API keys, search indexes, and ops health.",
5
5
  "type": "module",
6
6
  "bin": {