@mentio-dev/cli 0.1.1 → 0.2.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/README.md +2 -2
- package/dist/index.js +116 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../package.json","../src/config.ts","../src/flags.ts","../src/mcp.ts","../src/naming.ts","../src/generated/operations.ts","../src/output.ts","../../sdk/src/generated/core/bodySerializer.gen.ts","../../sdk/src/generated/core/params.gen.ts","../../sdk/src/generated/core/serverSentEvents.gen.ts","../../sdk/src/generated/core/pathSerializer.gen.ts","../../sdk/src/generated/core/utils.gen.ts","../../sdk/src/generated/core/auth.gen.ts","../../sdk/src/generated/client/utils.gen.ts","../../sdk/src/generated/client/client.gen.ts","../../sdk/src/generated/sdk.gen.ts","../../sdk/src/generated/client.gen.ts","../../sdk/src/index.ts","../src/run.ts","../src/watch.ts"],"sourcesContent":["/**\n * mentio: the command line for the Mentio API. Every public endpoint is a\n * `noun:verb` command generated from the OpenAPI document at build time\n * (./generated/operations.ts), so the CLI cannot drift from the API. Three\n * commands are hand-written because they are more than one request:\n * auth:*, mentions:watch and mcp:config.\n */\nimport { Command, Option } from 'commander';\nimport { writeFileSync } from 'node:fs';\nimport pkg from '../package.json' with { type: 'json' };\nimport { keyPrefix, resolveSettings, writeConfig, type Settings } from './config';\nimport { buildRequest, coerce, flagHelp, UsageError } from './flags';\nimport { DEFAULT_MCP_URL, mcpConfig, type McpClientKind } from './mcp';\nimport { commandName } from './naming';\nimport { OPERATIONS } from './generated/operations';\nimport type { CliField, CliOperation } from './operations-types';\nimport { formatOutput } from './output';\nimport { BEARER, clientFor, errorEnvelope, runOperation } from './run';\nimport { watchMentions } from './watch';\n\nconst program = new Command();\n\ninterface GlobalFlags {\n apiKey?: string;\n apiUrl?: string;\n pretty?: boolean;\n table?: boolean;\n}\n\nconst stdoutIsTty = (): boolean => Boolean(process.stdout.isTTY);\n\nfunction print(value: unknown, globals: GlobalFlags): void {\n process.stdout.write(`${formatOutput(value, { pretty: globals.pretty ?? stdoutIsTty(), table: globals.table ?? false })}\\n`);\n}\n\nfunction fail(envelope: { error: { code: string; message: string } }, code = 1): never {\n process.stderr.write(`${JSON.stringify(envelope)}\\n`);\n process.exit(code);\n}\n\nfunction settingsOrFail(globals: GlobalFlags, needsKey: boolean): Settings {\n const settings = resolveSettings({ apiKey: globals.apiKey, apiUrl: globals.apiUrl });\n if (needsKey && !settings.apiKey) {\n fail({ error: { code: 'no_api_key', message: 'No API key. Run `mentio auth:set --key mk_live_...`, set MENTIO_API_KEY, or pass --api-key.' } }, 2);\n }\n return settings;\n}\n\nfunction addFieldOption(command: Command, field: CliField): void {\n const option = new Option(`--${field.name} <value>`, flagHelp(field));\n if (field.enum && field.type !== 'array') option.choices(field.nullable ? [...field.enum, 'null'] : field.enum);\n command.addOption(option);\n}\n\nfunction registerOperation(op: CliOperation): void {\n const name = commandName(op);\n const command = program.command(name).description(op.summary).summary(op.summary);\n if (op.description) command.addHelpText('after', `\\n${op.description}\\n`);\n for (const param of op.params.filter((p) => p.in === 'path')) command.argument(`<${param.name}>`, param.description ?? '');\n for (const param of op.params.filter((p) => p.in === 'query')) addFieldOption(command, param);\n if (op.body) {\n for (const field of op.body.fields) addFieldOption(command, field);\n command.option('--json <object>', 'The whole body as JSON; flags override its fields. \"-\" reads stdin.');\n }\n if (op.response === 'csv') command.option('--out <file>', 'Write the CSV to a file instead of stdout.');\n command.action(async (...args: unknown[]) => {\n const cmd = args[args.length - 1] as Command;\n const positional = args.slice(0, -2) as string[];\n const flags = cmd.opts<Record<string, unknown>>();\n const globals = program.opts<GlobalFlags>();\n try {\n let jsonBody = typeof flags.json === 'string' ? flags.json : undefined;\n if (jsonBody === '-') jsonBody = await readStdin();\n const request = buildRequest(op, positional, flags, jsonBody);\n const settings = settingsOrFail(globals, op.operationId !== 'getHealth');\n const outcome = await runOperation(clientFor(settings), op, request);\n if (!outcome.ok) fail(errorEnvelope(outcome));\n if (op.response === 'csv') {\n const csv = typeof outcome.value === 'string' ? outcome.value : '';\n if (typeof flags.out === 'string') {\n writeFileSync(flags.out, csv);\n print({ ok: true, file: flags.out, bytes: Buffer.byteLength(csv) }, globals);\n } else {\n process.stdout.write(csv);\n }\n return;\n }\n print(outcome.value === undefined ? { ok: true, status: outcome.status } : outcome.value, globals);\n } catch (err) {\n if (err instanceof UsageError) fail({ error: { code: 'usage', message: err.message } }, 2);\n throw err;\n }\n });\n}\n\nasync function readStdin(): Promise<string> {\n const chunks: Buffer[] = [];\n for await (const chunk of process.stdin) chunks.push(typeof chunk === 'string' ? Buffer.from(chunk) : chunk);\n return Buffer.concat(chunks).toString('utf8');\n}\n\nfunction registerAuth(): void {\n program\n .command('auth:set')\n .description('Store an API key (and optionally the API host) in ~/.mentio/config.json')\n .requiredOption('--key <key>', 'API key from the dashboard or POST /v1/api-keys (mk_live_...)')\n .option('--url <url>', 'API host for a self-hosted deployment')\n .action((flags: { key: string; url?: string }) => {\n const path = writeConfig({ apiKey: flags.key, ...(flags.url ? { apiUrl: flags.url } : {}) });\n print({ ok: true, file: path, key: keyPrefix(flags.key) }, program.opts<GlobalFlags>());\n });\n program\n .command('auth:logout')\n .description('Remove the stored API key')\n .action(() => {\n const path = writeConfig({ apiKey: null });\n print({ ok: true, file: path }, program.opts<GlobalFlags>());\n });\n program\n .command('auth:check')\n .description('Verify the key: which workspace it belongs to and where it came from')\n .action(async () => {\n const globals = program.opts<GlobalFlags>();\n const settings = settingsOrFail(globals, true);\n const result = await clientFor(settings).request({ method: 'GET', url: '/v1/company', security: BEARER, throwOnError: false });\n if (result.error !== undefined || !result.response?.ok) {\n fail(errorEnvelope({ ok: false, status: result.response?.status ?? 0, value: result.error }));\n }\n const company = result.data as { name?: string } | undefined;\n print({ ok: true, workspace: company?.name ?? null, key: keyPrefix(settings.apiKey ?? ''), source: settings.source, apiUrl: settings.apiUrl }, globals);\n });\n}\n\nfunction registerWatch(): void {\n const search = OPERATIONS.find((op) => op.operationId === 'searchMentions');\n if (!search) return;\n const command = program\n .command('mentions:watch')\n .description('Follow the feed: print each new mention as one JSON line (tail -f for mentions)')\n .option('--interval <seconds>', 'Seconds between polls', '30')\n .option('--from-start', 'Print the current newest page first instead of only what arrives next');\n const skip = new Set(['cursor', 'limit', 'sort', 'since', 'until']);\n const filters = search.params.filter((p) => p.in === 'query' && !skip.has(p.name));\n for (const param of filters) addFieldOption(command, param);\n command.action(async (flags: Record<string, unknown>) => {\n const globals = program.opts<GlobalFlags>();\n const settings = settingsOrFail(globals, true);\n const query: Record<string, string | number | boolean> = {};\n try {\n for (const param of filters) {\n const raw = flags[param.name];\n if (raw === undefined) continue;\n const value = coerce(param, String(raw));\n if (value !== null && typeof value !== 'object') query[param.name] = value;\n }\n } catch (err) {\n if (err instanceof UsageError) fail({ error: { code: 'usage', message: err.message } }, 2);\n throw err;\n }\n const seconds = Number(flags.interval);\n if (!Number.isFinite(seconds) || seconds < 5) fail({ error: { code: 'usage', message: '--interval must be at least 5 seconds' } }, 2);\n const controller = new AbortController();\n process.on('SIGINT', () => controller.abort());\n process.on('SIGTERM', () => controller.abort());\n await watchMentions({\n client: clientFor(settings),\n query,\n intervalMs: seconds * 1000,\n fromStart: flags.fromStart === true,\n write: (line) => process.stdout.write(`${line}\\n`),\n warn: (line) => process.stderr.write(`${line}\\n`),\n signal: controller.signal,\n });\n });\n}\n\nfunction registerMcp(): void {\n program\n .command('mcp:config')\n .description('Print the MCP client configuration for the Mentio MCP server, key included')\n .addOption(new Option('--client <kind>', 'Which client to print for').choices(['claude', 'cursor', 'vscode', 'generic']).default('claude'))\n .option('--url <url>', 'MCP server URL', DEFAULT_MCP_URL)\n .action((flags: { client: McpClientKind; url: string }) => {\n const globals = program.opts<GlobalFlags>();\n const settings = resolveSettings({ apiKey: globals.apiKey, apiUrl: globals.apiUrl });\n const key = settings.apiKey ?? 'mk_live_...';\n if (!settings.apiKey) process.stderr.write('No API key configured; printing a placeholder. Run `mentio auth:set --key ...` first.\\n');\n process.stdout.write(`${mcpConfig(flags.client, flags.url, key)}\\n`);\n });\n}\n\nprogram\n .name('mentio')\n .description('Command line for the Mentio API. Commands are noun:verb; every endpoint has one.')\n .version(pkg.version, '-V, --version')\n .option('--api-key <key>', 'API key (overrides MENTIO_API_KEY and the stored key)')\n .option('--api-url <url>', 'API host (overrides MENTIO_API_URL and the stored host)')\n .option('--pretty', 'Indent JSON output (the default on a terminal)')\n .option('--table', 'Render lists as a table')\n .showHelpAfterError('(run with --help for usage)')\n .configureHelp({ sortSubcommands: true });\n\nregisterAuth();\nfor (const op of OPERATIONS) registerOperation(op);\nregisterWatch();\nregisterMcp();\n\nprogram.parseAsync(process.argv).catch((err: unknown) => {\n fail({ error: { code: 'internal_error', message: err instanceof Error ? err.message : String(err) } });\n});\n","{\n \"name\": \"@mentio-dev/cli\",\n \"version\": \"0.1.1\",\n \"description\": \"Command-line client for the Mentio API: one command per endpoint, plus watch and MCP helpers.\",\n \"license\": \"MIT\",\n \"homepage\": \"https://docs.mentio.dev/cli\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/PauGuirao/mentions.git\",\n \"directory\": \"packages/cli\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/PauGuirao/mentions/issues\"\n },\n \"keywords\": [\n \"mentio\",\n \"social listening\",\n \"brand monitoring\",\n \"cli\",\n \"mcp\"\n ],\n \"type\": \"module\",\n \"bin\": {\n \"mentio\": \"./dist/index.js\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"files\": [\n \"dist\",\n \"README.md\"\n ],\n \"engines\": {\n \"node\": \">=22\"\n },\n \"scripts\": {\n \"generate\": \"tsx scripts/generate-operations.ts\",\n \"build\": \"tsup\",\n \"dev\": \"tsx src/index.ts\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run\",\n \"prepublishOnly\": \"pnpm build\"\n },\n \"dependencies\": {\n \"commander\": \"^15.0.0\"\n },\n \"devDependencies\": {\n \"@mentio-dev/sdk\": \"workspace:*\",\n \"@types/node\": \"^22.15.0\",\n \"tsup\": \"^8.5.1\",\n \"tsx\": \"^4.23.1\",\n \"typescript\": \"^5.7.0\",\n \"vitest\": \"^3.0.0\"\n }\n}\n","/**\n * Where the CLI finds its key and its API host. Precedence: flags, then\n * MENTIO_API_KEY / MENTIO_API_URL, then ~/.mentio/config.json written by\n * `mentio auth:set`. MENTIO_CONFIG_DIR relocates the file (CI, tests).\n */\nimport { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\n\nexport const DEFAULT_API_URL = 'https://api.mentio.dev';\n\nexport interface StoredConfig {\n apiKey?: string;\n apiUrl?: string;\n}\n\nexport interface Settings {\n apiKey: string | undefined;\n apiUrl: string;\n /** Where the key came from, for `auth:check`. */\n source: 'flag' | 'env' | 'file' | 'none';\n}\n\nexport function configDir(env: NodeJS.ProcessEnv = process.env): string {\n return env.MENTIO_CONFIG_DIR ?? join(homedir(), '.mentio');\n}\n\nexport function configPath(env: NodeJS.ProcessEnv = process.env): string {\n return join(configDir(env), 'config.json');\n}\n\nexport function readConfig(env: NodeJS.ProcessEnv = process.env): StoredConfig {\n const path = configPath(env);\n if (!existsSync(path)) return {};\n try {\n const parsed: unknown = JSON.parse(readFileSync(path, 'utf8'));\n if (parsed === null || typeof parsed !== 'object') return {};\n const record = parsed as Record<string, unknown>;\n return {\n apiKey: typeof record.apiKey === 'string' ? record.apiKey : undefined,\n apiUrl: typeof record.apiUrl === 'string' ? record.apiUrl : undefined,\n };\n } catch {\n return {};\n }\n}\n\n/** Merges into the file; `undefined` leaves a field alone, `null` removes it. */\nexport function writeConfig(patch: { apiKey?: string | null; apiUrl?: string | null }, env: NodeJS.ProcessEnv = process.env): string {\n const current = readConfig(env);\n const next: StoredConfig = { ...current };\n if (patch.apiKey === null) delete next.apiKey;\n else if (patch.apiKey !== undefined) next.apiKey = patch.apiKey;\n if (patch.apiUrl === null) delete next.apiUrl;\n else if (patch.apiUrl !== undefined) next.apiUrl = patch.apiUrl;\n const dir = configDir(env);\n mkdirSync(dir, { recursive: true, mode: 0o700 });\n const path = configPath(env);\n writeFileSync(path, `${JSON.stringify(next, null, 2)}\\n`, { mode: 0o600 });\n // writeFileSync only applies the mode on creation; an existing file keeps its bits.\n chmodSync(path, 0o600);\n return path;\n}\n\nexport function resolveSettings(\n flags: { apiKey?: string; apiUrl?: string },\n env: NodeJS.ProcessEnv = process.env,\n): Settings {\n const file = readConfig(env);\n const apiUrl = (flags.apiUrl ?? env.MENTIO_API_URL ?? file.apiUrl ?? DEFAULT_API_URL).replace(/\\/+$/, '');\n if (flags.apiKey) return { apiKey: flags.apiKey, apiUrl, source: 'flag' };\n if (env.MENTIO_API_KEY) return { apiKey: env.MENTIO_API_KEY, apiUrl, source: 'env' };\n if (file.apiKey) return { apiKey: file.apiKey, apiUrl, source: 'file' };\n return { apiKey: undefined, apiUrl, source: 'none' };\n}\n\n/** mk_live_abcd... -> mk_live_abcd, enough to tell keys apart in output. */\nexport function keyPrefix(key: string): string {\n const match = /^([a-z]+_[a-z]+_[a-z0-9]{4})/i.exec(key);\n return match?.[1] ?? key.slice(0, 12);\n}\n","/**\n * Command-line values to API values. Every flag takes a value (`--muted\n * false`, never a bare `--muted`), so a PATCH can set a boolean either way,\n * and a nullable body field accepts the literal `null` to clear it, as the\n * API does. Lists are comma-separated; objects are JSON.\n */\nimport type { CliField, CliOperation } from './operations-types';\n\nexport class UsageError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UsageError';\n }\n}\n\nexport type ApiValue = string | number | boolean | null | ApiValue[] | { [key: string]: ApiValue };\n\nfunction coerceScalar(field: CliField, raw: string, type: CliField['type']): ApiValue {\n switch (type) {\n case 'integer':\n case 'number': {\n const n = Number(raw);\n // Instants (since, until, snoozedUntil) are epoch milliseconds in the\n // spec but the API takes ISO 8601 too; let a date through as written.\n if (!Number.isFinite(n) && /^\\d{4}-\\d{2}-\\d{2}/.test(raw) && Number.isFinite(Date.parse(raw))) return raw;\n if (raw.trim() === '' || !Number.isFinite(n)) throw new UsageError(`--${field.name} expects a number, got \"${raw}\"`);\n if (type === 'integer' && !Number.isInteger(n)) throw new UsageError(`--${field.name} expects a whole number, got \"${raw}\"`);\n return n;\n }\n case 'boolean':\n if (raw === 'true') return true;\n if (raw === 'false') return false;\n throw new UsageError(`--${field.name} expects true or false, got \"${raw}\"`);\n case 'object': {\n try {\n const parsed: unknown = JSON.parse(raw);\n if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) throw new Error('not an object');\n return parsed as ApiValue;\n } catch {\n throw new UsageError(`--${field.name} expects a JSON object, got \"${raw}\"`);\n }\n }\n case 'array':\n case 'string':\n default:\n return raw;\n }\n}\n\n/** One flag value as the API wants it. Query lists stay comma-separated\n * strings (the API splits them); body lists become arrays. */\nexport function coerce(field: CliField, raw: string): ApiValue {\n if (field.nullable && raw === 'null') return null;\n if (field.type === 'array') {\n if (field.in === 'query') return raw;\n const trimmed = raw.trim();\n if (trimmed.startsWith('[')) {\n try {\n return JSON.parse(trimmed) as ApiValue;\n } catch {\n throw new UsageError(`--${field.name} expects a comma-separated list or a JSON array`);\n }\n }\n const items = trimmed === '' ? [] : trimmed.split(',').map((v) => v.trim());\n return items.map((item) => coerceScalar(field, item, field.items ?? 'string'));\n }\n return coerceScalar(field, raw, field.type);\n}\n\n/** The text after the flag in --help. */\nexport function flagHelp(field: CliField): string {\n const parts: string[] = [];\n if (field.description) parts.push(field.description.replace(/\\s+/g, ' ').trim());\n // Scalar enums become commander choices, which --help prints on its own.\n const hints: string[] = [];\n if (field.type === 'array') hints.push(field.enum ? `comma-separated: ${field.enum.join('|')}` : 'comma-separated');\n else if (field.type === 'object') hints.push('JSON');\n else if (field.type !== 'string' && !field.enum) hints.push(field.type);\n if (field.nullable) hints.push('null clears');\n if (hints.length > 0) parts.push(`(${hints.join(', ')})`);\n return parts.join(' ');\n}\n\nexport interface BuiltRequest {\n path: Record<string, string>;\n query: Record<string, string | number | boolean>;\n body: Record<string, ApiValue> | undefined;\n}\n\n/** Positional arguments, flags and an optional --json body into the three\n * parts of a request. --json is the base; flags override its fields. */\nexport function buildRequest(op: CliOperation, positional: string[], flags: Record<string, unknown>, jsonBody: string | undefined): BuiltRequest {\n const path: Record<string, string> = {};\n const pathParams = op.params.filter((p) => p.in === 'path');\n pathParams.forEach((param, index) => {\n const value = positional[index];\n if (value === undefined || value === '') throw new UsageError(`missing <${param.name}>`);\n path[param.name] = value;\n });\n\n const query: Record<string, string | number | boolean> = {};\n for (const param of op.params.filter((p) => p.in === 'query')) {\n const raw = flags[param.name];\n if (raw === undefined) continue;\n const value = coerce(param, String(raw));\n if (value === null || typeof value === 'object') continue;\n query[param.name] = value;\n }\n\n let body: Record<string, ApiValue> | undefined;\n if (op.body) {\n body = {};\n if (jsonBody !== undefined) {\n let parsed: unknown;\n try {\n parsed = JSON.parse(jsonBody);\n } catch {\n throw new UsageError('--json is not valid JSON');\n }\n if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) throw new UsageError('--json must be a JSON object');\n body = parsed as Record<string, ApiValue>;\n }\n for (const field of op.body.fields) {\n const raw = flags[field.name];\n if (raw === undefined) continue;\n body[field.name] = coerce(field, String(raw));\n }\n for (const field of op.body.fields) {\n if (field.required && body[field.name] === undefined) throw new UsageError(`--${field.name} is required`);\n }\n }\n return { path, query, body };\n}\n","/** mcp:config: the snippet that connects an MCP client to the Mentio MCP\n * server, with the key filled in from the CLI's own settings. */\nexport const DEFAULT_MCP_URL = 'https://mcp.mentio.dev/mcp';\n\nexport type McpClientKind = 'claude' | 'cursor' | 'vscode' | 'generic';\n\nexport function mcpConfig(kind: McpClientKind, url: string, apiKey: string): string {\n const auth = `Bearer ${apiKey}`;\n switch (kind) {\n case 'claude':\n return `claude mcp add --transport http mentio ${url} --header \"Authorization: ${auth}\"`;\n case 'vscode':\n return JSON.stringify({ servers: { mentio: { type: 'http', url, headers: { Authorization: auth } } } }, null, 2);\n case 'cursor':\n return JSON.stringify({ mcpServers: { mentio: { url, headers: { Authorization: auth } } } }, null, 2);\n case 'generic':\n return JSON.stringify({ mcpServers: { mentio: { type: 'http', url, headers: { Authorization: auth } } } }, null, 2);\n }\n}\n","/**\n * How an API operation becomes a CLI command: `noun:verb`, the noun being\n * the resource in the path and the verb the action, so the CLI reads like\n * the REST API and like the Zernio CLI. Pure, so the docs can generate the\n * commands page from the same rule.\n *\n * GET /v1/keywords -> keywords:list\n * GET /v1/mentions -> mentions:search (operationId starts with search)\n * POST /v1/keywords -> keywords:create\n * GET /v1/keywords/{id} -> keywords:get\n * PATCH /v1/keywords/{id} -> keywords:update\n * DELETE /v1/api-keys/{id} -> api-keys:revoke (operationId starts with revoke)\n * POST /v1/people/{id}/merge -> people:merge\n * GET /v1/channels/{id}/deliveries -> channels:deliveries\n * GET /v1/analytics/summary -> analytics:summary\n * GET /v1/mentions/export.csv -> mentions:export\n * GET /v1/company -> company:get\n * GET /v1/health -> system:health\n */\nexport interface OperationRef {\n operationId: string;\n method: string;\n path: string;\n}\n\nexport function commandName(op: OperationRef): string {\n const segments = op.path.replace(/^\\/v1\\//, '').split('/');\n const noun = segments[0] ?? '';\n if (noun === 'health') return 'system:health';\n const rest = segments.slice(1);\n const hasId = rest.some((s) => s.startsWith('{'));\n const action = rest.find((s) => !s.startsWith('{'));\n const method = op.method.toLowerCase();\n let verb: string;\n if (action !== undefined) {\n verb = action === 'export.csv' ? 'export' : action;\n } else if (method === 'get' && !hasId) {\n verb = op.operationId.startsWith('search') ? 'search' : noun === 'company' ? 'get' : 'list';\n } else if (method === 'post' && !hasId) {\n verb = 'create';\n } else if (method === 'get') {\n verb = 'get';\n } else if (method === 'patch') {\n verb = 'update';\n } else if (method === 'delete') {\n verb = op.operationId.startsWith('revoke') ? 'revoke' : 'delete';\n } else {\n verb = method;\n }\n return `${noun}:${verb}`;\n}\n\n/** The group a command is listed under in --help and in the docs. */\nexport function commandGroup(name: string): string {\n return name.split(':')[0] ?? name;\n}\n","// Generated by scripts/generate-operations.ts from ../../sdk/openapi.json. Do not edit.\nimport type { CliOperation } from '../operations-types';\n\nexport const OPERATIONS: readonly CliOperation[] = [\n {\n \"operationId\": \"getHealth\",\n \"method\": \"GET\",\n \"path\": \"/v1/health\",\n \"summary\": \"getHealth\",\n \"tag\": \"System\",\n \"params\": [],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"createKeyword\",\n \"method\": \"POST\",\n \"path\": \"/v1/keywords\",\n \"summary\": \"Track a keyword\",\n \"description\": \"Start tracking a word or phrase. Matching, classification and delivery begin on the next poll. Free workspaces track 2 keywords; a subscription raises that to 500.\",\n \"tag\": \"Keywords\",\n \"params\": [],\n \"body\": {\n \"fields\": [\n {\n \"name\": \"term\",\n \"type\": \"string\",\n \"description\": \"The word or phrase to track, matched case-insensitively as a phrase.\",\n \"required\": true,\n \"nullable\": false\n },\n {\n \"name\": \"kind\",\n \"type\": \"string\",\n \"description\": \"brand: your own names. competitor: theirs. topic: the space. Drives share of voice and segments.\",\n \"enum\": [\n \"brand\",\n \"competitor\",\n \"topic\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"type\": \"array\",\n \"description\": \"Platforms to track it on; omit or null for every platform.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": true,\n \"items\": \"string\"\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"listKeywords\",\n \"method\": \"GET\",\n \"path\": \"/v1/keywords\",\n \"summary\": \"List keywords\",\n \"description\": \"Every keyword of the workspace, newest first, with its match stats and poll health.\",\n \"tag\": \"Keywords\",\n \"params\": [],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getKeyword\",\n \"method\": \"GET\",\n \"path\": \"/v1/keywords/{id}\",\n \"summary\": \"Get a keyword\",\n \"tag\": \"Keywords\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Keyword id (kw_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"updateKeyword\",\n \"method\": \"PATCH\",\n \"path\": \"/v1/keywords/{id}\",\n \"summary\": \"Update a keyword\",\n \"description\": \"Mute or unmute it, or change the platforms it is tracked on.\",\n \"tag\": \"Keywords\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Keyword id (kw_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": {\n \"description\": \"Omitted fields are untouched.\",\n \"fields\": [\n {\n \"name\": \"muted\",\n \"type\": \"boolean\",\n \"description\": \"A muted keyword stops polling and matching; its mentions stay.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"type\": \"array\",\n \"description\": \"Replaces the platform list; null means every platform.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": true,\n \"items\": \"string\"\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"deleteKeyword\",\n \"method\": \"DELETE\",\n \"path\": \"/v1/keywords/{id}\",\n \"summary\": \"Delete a keyword\",\n \"description\": \"Removes the keyword and its matches. Posts also matched by another keyword stay.\",\n \"tag\": \"Keywords\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Keyword id (kw_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"none\"\n },\n {\n \"operationId\": \"updateMention\",\n \"method\": \"PATCH\",\n \"path\": \"/v1/mentions/{id}\",\n \"summary\": \"Update a mention\",\n \"description\": \"The one write on a mention. Set status to ignored or done to handle it (open puts it back), assign it to a workspace member, snooze it out of the feed, or leave an internal note. Null clears a field; omitted fields are untouched. Delivery and billing never change.\",\n \"tag\": \"Mentions\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Mention id (mm_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": {\n \"description\": \"Every field is optional; omitted fields are untouched.\",\n \"fields\": [\n {\n \"name\": \"status\",\n \"type\": \"string\",\n \"description\": \"ignored or done to handle it; open to put it back.\",\n \"enum\": [\n \"open\",\n \"ignored\",\n \"done\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"assigneeId\",\n \"type\": \"string\",\n \"description\": \"A workspace member (user id), or null to unassign.\",\n \"required\": false,\n \"nullable\": true\n },\n {\n \"name\": \"snoozedUntil\",\n \"type\": \"integer\",\n \"description\": \"ISO 8601 (or epoch ms) until which the mention leaves the feed; null wakes it.\",\n \"required\": false,\n \"nullable\": true\n },\n {\n \"name\": \"note\",\n \"type\": \"string\",\n \"description\": \"Internal note; null or empty clears it.\",\n \"required\": false,\n \"nullable\": true\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getMention\",\n \"method\": \"GET\",\n \"path\": \"/v1/mentions/{id}\",\n \"summary\": \"Get a mention\",\n \"description\": \"One mention by id, as it appears in the list: the post, its author with reach and your tags, the classification, the priority score and the triage fields. Ids belong to your organization; any other id is a 404.\",\n \"tag\": \"Mentions\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Mention id (mm_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"searchMentions\",\n \"method\": \"GET\",\n \"path\": \"/v1/mentions\",\n \"summary\": \"List mentions\",\n \"description\": \"Mentions matched to your keywords, filtered and paginated. Default order is newest match first; sort=priority ranks by attention score. Page with nextCursor, passing the same filters and sort. A mention is one post matched to one keyword.\",\n \"tag\": \"Mentions\",\n \"params\": [\n {\n \"name\": \"keywordId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only matches of this keyword.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platform\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only posts from this platform.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"status\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only mentions in this status. Omit for every status.\",\n \"enum\": [\n \"open\",\n \"ignored\",\n \"done\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"relevant\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: only mentions the classifier scored relevant; false: only the rest (unclassified included).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"sentiment\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only this sentiment.\",\n \"enum\": [\n \"positive\",\n \"neutral\",\n \"negative\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"intent\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only mentions carrying this intent (buy_intent, question, complaint, praise, comparison).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"personId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only this person (an id from /v1/people), merged accounts included. Implies includeMuted.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"includeMuted\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: include mentions by people you muted, hidden by default.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"assigneeId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only mentions assigned to this workspace member (user id).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"snoozed\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: only mentions currently snoozed. Otherwise snoozed mentions stay out until they wake.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"excludeAuthors\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Hide these authors: display names, handles or profile URLs. Repeatable, or one comma-separated value.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minRelevance\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only mentions scored at least this; unclassified ones are excluded.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minFollowers\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only authors with at least this many followers. Unknown reach never passes.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"tags\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Only authors your workspace tagged with any of these (exact, case-sensitive). Repeatable, or comma-separated.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"q\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Substring search in the post text.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"since\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only posts published at or after this instant (ISO 8601, or epoch ms).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"until\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only posts published at or before this instant (ISO 8601, or epoch ms).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"sort\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"newest: by match time, newest first. priority: by attention score, highest first. Cursors are specific to a sort.\",\n \"enum\": [\n \"newest\",\n \"priority\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"cursor\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"nextCursor from the previous page; pass the same filters and sort.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"limit\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Page size, 1 to 100.\",\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"exportMentionsCsv\",\n \"method\": \"GET\",\n \"path\": \"/v1/mentions/export.csv\",\n \"summary\": \"Export mentions as CSV\",\n \"description\": \"The same mentions GET /v1/mentions would list for these filters, as CSV, newest published first: id, published_at, platform, keyword, author, author_url, author_followers, relevance, sentiment, intents (pipe-separated), status, relevant, delivered, url, text (first 1,000 characters). Capped at 10,000 rows; the X-Mentions-Truncated header says when the cap cut the list.\",\n \"tag\": \"Mentions\",\n \"params\": [\n {\n \"name\": \"keywordId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only matches of this keyword.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platform\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only posts from this platform.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"status\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only mentions in this status. Omit for every status.\",\n \"enum\": [\n \"open\",\n \"ignored\",\n \"done\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"relevant\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: only mentions the classifier scored relevant; false: only the rest (unclassified included).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"sentiment\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only this sentiment.\",\n \"enum\": [\n \"positive\",\n \"neutral\",\n \"negative\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"intent\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only mentions carrying this intent (buy_intent, question, complaint, praise, comparison).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"personId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only this person (an id from /v1/people), merged accounts included. Implies includeMuted.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"includeMuted\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: include mentions by people you muted, hidden by default.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"assigneeId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only mentions assigned to this workspace member (user id).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"snoozed\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: only mentions currently snoozed. Otherwise snoozed mentions stay out until they wake.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"excludeAuthors\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Hide these authors: display names, handles or profile URLs. Repeatable, or one comma-separated value.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minRelevance\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only mentions scored at least this; unclassified ones are excluded.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minFollowers\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only authors with at least this many followers. Unknown reach never passes.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"tags\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Only authors your workspace tagged with any of these (exact, case-sensitive). Repeatable, or comma-separated.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"q\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Substring search in the post text.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"since\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only posts published at or after this instant (ISO 8601, or epoch ms).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"until\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only posts published at or before this instant (ISO 8601, or epoch ms).\",\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"csv\"\n },\n {\n \"operationId\": \"exportPeopleCsv\",\n \"method\": \"GET\",\n \"path\": \"/v1/people/export.csv\",\n \"summary\": \"Export people as CSV\",\n \"description\": \"The same list as GET /v1/people (segmentId included) as CSV, one row per person with their contact columns: handle, followers, email, website, company, location, tags. Capped at 5,000 people.\",\n \"tag\": \"People\",\n \"params\": [\n {\n \"name\": \"platform\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"People with an account on this platform.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"q\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Matches the display name or the profile handle or URL, case-insensitively.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"tag\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only people carrying this tag (exact, case-sensitive).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"muted\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: only muted people; false: only unmuted; omitted: everyone.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"since\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only people whose first matched mention is at or after this instant (ISO 8601, or epoch ms).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"segmentId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"A saved segment applied on top of every other filter here. Unknown id: 404.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"People with an account on any of these platforms. Repeatable, or comma-separated.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"tags\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"People carrying any of these tags. Repeatable, or comma-separated.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minFollowers\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At least this many followers. Unknown reach never matches.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"maxFollowers\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At most this many followers.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minMentions\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At least this many matched mentions.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minNegative\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At least this many negative mentions.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"intents\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"At least one mention carrying any of these intents.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"keywordKinds\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Mentioned a keyword of any of these kinds.\",\n \"enum\": [\n \"brand\",\n \"competitor\",\n \"topic\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"neverKeywordKinds\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Never mentioned a keyword of these kinds.\",\n \"enum\": [\n \"brand\",\n \"competitor\",\n \"topic\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"newSinceDays\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"First seen within this many days.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"sort\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"mentions: most matches first. recent: last seen first. reach: most followers first, unknown last. new: first seen most recently first.\",\n \"enum\": [\n \"mentions\",\n \"recent\",\n \"reach\",\n \"new\"\n ],\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"csv\"\n },\n {\n \"operationId\": \"listPeople\",\n \"method\": \"GET\",\n \"path\": \"/v1/people\",\n \"summary\": \"List people\",\n \"description\": \"The people behind your mentions: one row per person, with their accounts, reach, public profile, per-workspace stats and your annotations. Filter by platform, tag, follower range, mention counts, intents seen, keyword kinds mentioned or never mentioned, or a saved segment. Offset-paginated with a total.\",\n \"tag\": \"People\",\n \"params\": [\n {\n \"name\": \"platform\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"People with an account on this platform.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"q\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Matches the display name or the profile handle or URL, case-insensitively.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"tag\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only people carrying this tag (exact, case-sensitive).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"muted\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: only muted people; false: only unmuted; omitted: everyone.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"since\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only people whose first matched mention is at or after this instant (ISO 8601, or epoch ms).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"segmentId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"A saved segment applied on top of every other filter here. Unknown id: 404.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"People with an account on any of these platforms. Repeatable, or comma-separated.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"tags\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"People carrying any of these tags. Repeatable, or comma-separated.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minFollowers\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At least this many followers. Unknown reach never matches.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"maxFollowers\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At most this many followers.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minMentions\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At least this many matched mentions.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minNegative\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At least this many negative mentions.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"intents\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"At least one mention carrying any of these intents.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"keywordKinds\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Mentioned a keyword of any of these kinds.\",\n \"enum\": [\n \"brand\",\n \"competitor\",\n \"topic\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"neverKeywordKinds\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Never mentioned a keyword of these kinds.\",\n \"enum\": [\n \"brand\",\n \"competitor\",\n \"topic\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"newSinceDays\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"First seen within this many days.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"sort\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"mentions: most matches first. recent: last seen first. reach: most followers first, unknown last. new: first seen most recently first.\",\n \"enum\": [\n \"mentions\",\n \"recent\",\n \"reach\",\n \"new\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"limit\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Page size, 1 to 100.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"offset\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Skip this many people. Offset paging: a grouped read over hundreds of people, not a stream.\",\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getPerson\",\n \"method\": \"GET\",\n \"path\": \"/v1/people/{id}\",\n \"summary\": \"Get a person\",\n \"description\": \"One person as your workspace sees them. An account merged into someone resolves to that person.\",\n \"tag\": \"People\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Person id (aut_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"updatePerson\",\n \"method\": \"PATCH\",\n \"path\": \"/v1/people/{id}\",\n \"summary\": \"Update your annotations on a person\",\n \"description\": \"Tags, notes and mute, for your workspace only. Mute hides their posts from your feed and every channel; ingest and billing never change.\",\n \"tag\": \"People\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Person id (aut_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": {\n \"description\": \"Omitted fields are untouched.\",\n \"fields\": [\n {\n \"name\": \"tags\",\n \"type\": \"array\",\n \"description\": \"Replaces the whole list.\",\n \"required\": false,\n \"nullable\": false,\n \"items\": \"string\"\n },\n {\n \"name\": \"notes\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"muted\",\n \"type\": \"boolean\",\n \"required\": false,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"mergePeople\",\n \"method\": \"POST\",\n \"path\": \"/v1/people/{id}/merge\",\n \"summary\": \"Merge an account into a person\",\n \"description\": \"Declare that this account and another person are the same human, for your workspace only. Their mentions, tags and notes combine under the person named by `into`.\",\n \"tag\": \"People\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Person id (aut_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": {\n \"fields\": [\n {\n \"name\": \"into\",\n \"type\": \"string\",\n \"description\": \"The person to fold this account into (their id).\",\n \"required\": true,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"splitPerson\",\n \"method\": \"POST\",\n \"path\": \"/v1/people/{id}/split\",\n \"summary\": \"Undo a merge\",\n \"description\": \"The account becomes its own person again.\",\n \"tag\": \"People\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Person id (aut_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"listSegments\",\n \"method\": \"GET\",\n \"path\": \"/v1/segments\",\n \"summary\": \"List segments\",\n \"description\": \"Your saved segments, each with the number of people in it right now (segments are evaluated on every read, never materialized), plus presets you can save as a starting point. Pass a segment id to GET /v1/people to list its members.\",\n \"tag\": \"Segments\",\n \"params\": [],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"createSegment\",\n \"method\": \"POST\",\n \"path\": \"/v1/segments\",\n \"summary\": \"Create a segment\",\n \"tag\": \"Segments\",\n \"params\": [],\n \"body\": {\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"required\": true,\n \"nullable\": false\n },\n {\n \"name\": \"description\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"filter\",\n \"type\": \"object\",\n \"required\": false,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getSegment\",\n \"method\": \"GET\",\n \"path\": \"/v1/segments/{id}\",\n \"summary\": \"Get a segment\",\n \"tag\": \"Segments\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Segment id (seg_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"updateSegment\",\n \"method\": \"PATCH\",\n \"path\": \"/v1/segments/{id}\",\n \"summary\": \"Update a segment\",\n \"tag\": \"Segments\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Segment id (seg_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": {\n \"description\": \"Omitted fields are untouched.\",\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"description\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"filter\",\n \"type\": \"object\",\n \"description\": \"Replaces the whole filter.\",\n \"required\": false,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"deleteSegment\",\n \"method\": \"DELETE\",\n \"path\": \"/v1/segments/{id}\",\n \"summary\": \"Delete a segment\",\n \"description\": \"Nobody in it is affected.\",\n \"tag\": \"Segments\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Segment id (seg_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"none\"\n },\n {\n \"operationId\": \"getCompany\",\n \"method\": \"GET\",\n \"path\": \"/v1/company\",\n \"summary\": \"Get the company profile\",\n \"description\": \"What the classifier knows about you: name, description, use cases, your own accounts, and the composed context it reads.\",\n \"tag\": \"Company\",\n \"params\": [],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"updateCompany\",\n \"method\": \"PATCH\",\n \"path\": \"/v1/company\",\n \"summary\": \"Update the company profile\",\n \"description\": \"Changing profile fields recomposes the classifier context; setting `context` directly overrides it until the next profile edit. Relevance scores for new mentions follow at once.\",\n \"tag\": \"Company\",\n \"params\": [],\n \"body\": {\n \"description\": \"Omitted fields are untouched.\",\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"description\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"useCases\",\n \"type\": \"array\",\n \"description\": \"Replaces the whole list.\",\n \"required\": false,\n \"nullable\": false,\n \"items\": \"string\"\n },\n {\n \"name\": \"accounts\",\n \"type\": \"object\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"context\",\n \"type\": \"string\",\n \"description\": \"Overrides the composed context until the next profile edit.\",\n \"required\": false,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"createApiKey\",\n \"method\": \"POST\",\n \"path\": \"/v1/api-keys\",\n \"summary\": \"Create an API key\",\n \"description\": \"Mint a key for this workspace. The key itself is returned once; only its hash is stored.\",\n \"tag\": \"API keys\",\n \"params\": [],\n \"body\": {\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"description\": \"A label for the key; \\\"default\\\" when omitted.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"scope\",\n \"type\": \"string\",\n \"description\": \"read: GET only. write: everything.\",\n \"enum\": [\n \"read\",\n \"write\"\n ],\n \"required\": false,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"listApiKeys\",\n \"method\": \"GET\",\n \"path\": \"/v1/api-keys\",\n \"summary\": \"List API keys\",\n \"tag\": \"API keys\",\n \"params\": [],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"revokeApiKey\",\n \"method\": \"DELETE\",\n \"path\": \"/v1/api-keys/{id}\",\n \"summary\": \"Revoke an API key\",\n \"description\": \"Takes effect at once on the API and within a few minutes on cached verifications.\",\n \"tag\": \"API keys\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"API key id (key_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"none\"\n },\n {\n \"operationId\": \"getAlert\",\n \"method\": \"GET\",\n \"path\": \"/v1/alerts/{id}\",\n \"summary\": \"Get an alert\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Alert id (feed_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"updateAlert\",\n \"method\": \"PATCH\",\n \"path\": \"/v1/alerts/{id}\",\n \"summary\": \"Update an alert\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Alert id (feed_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": {\n \"description\": \"Omitted fields are untouched.\",\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"enabled\",\n \"type\": \"boolean\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"mode\",\n \"type\": \"string\",\n \"enum\": [\n \"instant\",\n \"daily\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"filter\",\n \"type\": \"object\",\n \"description\": \"Replaces the whole filter.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"schedule\",\n \"type\": \"object\",\n \"required\": false,\n \"nullable\": true\n },\n {\n \"name\": \"event\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": true\n },\n {\n \"name\": \"channelIds\",\n \"type\": \"array\",\n \"description\": \"Replaces the whole list.\",\n \"required\": false,\n \"nullable\": false,\n \"items\": \"string\"\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"deleteAlert\",\n \"method\": \"DELETE\",\n \"path\": \"/v1/alerts/{id}\",\n \"summary\": \"Delete an alert\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Alert id (feed_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"none\"\n },\n {\n \"operationId\": \"listAlerts\",\n \"method\": \"GET\",\n \"path\": \"/v1/alerts\",\n \"summary\": \"List alerts\",\n \"tag\": \"Alerts\",\n \"params\": [],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"createAlert\",\n \"method\": \"POST\",\n \"path\": \"/v1/alerts\",\n \"summary\": \"Create an alert\",\n \"tag\": \"Alerts\",\n \"params\": [],\n \"body\": {\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"required\": true,\n \"nullable\": false\n },\n {\n \"name\": \"enabled\",\n \"type\": \"boolean\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"mode\",\n \"type\": \"string\",\n \"enum\": [\n \"instant\",\n \"daily\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"filter\",\n \"type\": \"object\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"schedule\",\n \"type\": \"object\",\n \"description\": \"Required for daily alerts.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"event\",\n \"type\": \"string\",\n \"description\": \"Custom event name for webhook payloads; null for the mode default.\",\n \"required\": false,\n \"nullable\": true\n },\n {\n \"name\": \"channelIds\",\n \"type\": \"array\",\n \"description\": \"Channel ids from GET /v1/channels.\",\n \"required\": false,\n \"nullable\": false,\n \"items\": \"string\"\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"testAlert\",\n \"method\": \"POST\",\n \"path\": \"/v1/alerts/{id}/test\",\n \"summary\": \"Send a test through an alert's channels\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Alert id (feed_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"runAlertDigest\",\n \"method\": \"POST\",\n \"path\": \"/v1/alerts/{id}/run\",\n \"summary\": \"Send a digest now\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Alert id (feed_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getAnalyticsSummary\",\n \"method\": \"GET\",\n \"path\": \"/v1/analytics/summary\",\n \"summary\": \"Headline counts for a window\",\n \"description\": \"Matched and relevant mentions, distinct posts and people, sentiment, buying intent and questions, estimated reach, and where the matches stand in triage. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\",\n \"tag\": \"Analytics\",\n \"params\": [\n {\n \"name\": \"range\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Preset window ending today. Ignored when from or to is given. Default 30d.\",\n \"enum\": [\n \"7d\",\n \"30d\",\n \"90d\",\n \"365d\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"from\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"First day, YYYY-MM-DD, inclusive, in `timezone`.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"to\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Last day, YYYY-MM-DD, inclusive, in `timezone`. Default today.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"keywordIds\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated keyword ids; omit for every keyword.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated platforms (bluesky, hackernews, github, ...); omit for every platform.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"compare\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"true adds the period of the same length right before the window as `previous`.\",\n \"enum\": [\n \"true\",\n \"false\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"timezone\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"IANA zone the days are cut in (Europe/Madrid). Default UTC. One offset, the zone's at the end of the window, applies to the whole window.\",\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getAnalyticsSeries\",\n \"method\": \"GET\",\n \"path\": \"/v1/analytics/series\",\n \"summary\": \"Mentions over time\",\n \"description\": \"Matched, relevant and sentiment counts per day or week across the window, as one total series or split per platform or per keyword with `by`. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\",\n \"tag\": \"Analytics\",\n \"params\": [\n {\n \"name\": \"range\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Preset window ending today. Ignored when from or to is given. Default 30d.\",\n \"enum\": [\n \"7d\",\n \"30d\",\n \"90d\",\n \"365d\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"from\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"First day, YYYY-MM-DD, inclusive, in `timezone`.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"to\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Last day, YYYY-MM-DD, inclusive, in `timezone`. Default today.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"keywordIds\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated keyword ids; omit for every keyword.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated platforms (bluesky, hackernews, github, ...); omit for every platform.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"compare\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"true adds the period of the same length right before the window as `previous`.\",\n \"enum\": [\n \"true\",\n \"false\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"timezone\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"IANA zone the days are cut in (Europe/Madrid). Default UTC. One offset, the zone's at the end of the window, applies to the whole window.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"bucket\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Point granularity. Default: day up to 90 days, week beyond. Weeks start on Monday.\",\n \"enum\": [\n \"day\",\n \"week\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"by\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Split into one series per platform or per keyword (the top 20 by matched, the rest folded into \\\"other\\\"). Omit for one total series.\",\n \"enum\": [\n \"platform\",\n \"keyword\"\n ],\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getAnalyticsBreakdown\",\n \"method\": \"GET\",\n \"path\": \"/v1/analytics/breakdown\",\n \"summary\": \"Mentions grouped by one dimension\",\n \"description\": \"One table of matched, relevant and sentiment counts grouped by `by`: platform, keyword, sentiment, intent, status, hour (weekday and hour of day) or person. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\",\n \"tag\": \"Analytics\",\n \"params\": [\n {\n \"name\": \"range\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Preset window ending today. Ignored when from or to is given. Default 30d.\",\n \"enum\": [\n \"7d\",\n \"30d\",\n \"90d\",\n \"365d\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"from\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"First day, YYYY-MM-DD, inclusive, in `timezone`.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"to\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Last day, YYYY-MM-DD, inclusive, in `timezone`. Default today.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"keywordIds\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated keyword ids; omit for every keyword.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated platforms (bluesky, hackernews, github, ...); omit for every platform.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"compare\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"true adds the period of the same length right before the window as `previous`.\",\n \"enum\": [\n \"true\",\n \"false\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"timezone\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"IANA zone the days are cut in (Europe/Madrid). Default UTC. One offset, the zone's at the end of the window, applies to the whole window.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"by\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"The dimension to group by: platform, keyword, sentiment (unclassified included), intent (a mention can carry several), status (open, ignored, done), hour (weekday and hour of day in `timezone`), person (who posted; anonymous posts are left out).\",\n \"enum\": [\n \"platform\",\n \"keyword\",\n \"sentiment\",\n \"intent\",\n \"status\",\n \"hour\",\n \"person\"\n ],\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getShareOfVoice\",\n \"method\": \"GET\",\n \"path\": \"/v1/analytics/share-of-voice\",\n \"summary\": \"Brand against competitors\",\n \"description\": \"Every keyword matched in the window with its counts and its share of brand plus competitor matches; topic keywords are counted but stay out of the split. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\",\n \"tag\": \"Analytics\",\n \"params\": [\n {\n \"name\": \"range\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Preset window ending today. Ignored when from or to is given. Default 30d.\",\n \"enum\": [\n \"7d\",\n \"30d\",\n \"90d\",\n \"365d\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"from\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"First day, YYYY-MM-DD, inclusive, in `timezone`.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"to\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Last day, YYYY-MM-DD, inclusive, in `timezone`. Default today.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"keywordIds\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated keyword ids; omit for every keyword.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated platforms (bluesky, hackernews, github, ...); omit for every platform.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"compare\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"true adds the period of the same length right before the window as `previous`.\",\n \"enum\": [\n \"true\",\n \"false\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"timezone\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"IANA zone the days are cut in (Europe/Madrid). Default UTC. One offset, the zone's at the end of the window, applies to the whole window.\",\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getChannel\",\n \"method\": \"GET\",\n \"path\": \"/v1/channels/{id}\",\n \"summary\": \"Get a channel\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Channel id (dest_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"updateChannel\",\n \"method\": \"PATCH\",\n \"path\": \"/v1/channels/{id}\",\n \"summary\": \"Update a channel\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Channel id (dest_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": {\n \"description\": \"Omitted fields are untouched.\",\n \"fields\": [\n {\n \"name\": \"label\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"url\",\n \"type\": \"string\",\n \"description\": \"Webhooks only.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"headers\",\n \"type\": \"object\",\n \"description\": \"Webhooks only; replaces the whole set.\",\n \"required\": false,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"deleteChannel\",\n \"method\": \"DELETE\",\n \"path\": \"/v1/channels/{id}\",\n \"summary\": \"Delete a channel\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Channel id (dest_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"none\"\n },\n {\n \"operationId\": \"testChannel\",\n \"method\": \"POST\",\n \"path\": \"/v1/channels/{id}/test\",\n \"summary\": \"Send a test to a channel\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Channel id (dest_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"rotateWebhookSecret\",\n \"method\": \"POST\",\n \"path\": \"/v1/channels/{id}/rotate-secret\",\n \"summary\": \"Rotate a webhook secret\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Channel id (dest_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"listChannelDeliveries\",\n \"method\": \"GET\",\n \"path\": \"/v1/channels/{id}/deliveries\",\n \"summary\": \"List deliveries to a channel\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Channel id (dest_...).\",\n \"required\": true,\n \"nullable\": false\n },\n {\n \"name\": \"limit\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"listChannels\",\n \"method\": \"GET\",\n \"path\": \"/v1/channels\",\n \"summary\": \"List channels\",\n \"tag\": \"Alerts\",\n \"params\": [],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"createChannel\",\n \"method\": \"POST\",\n \"path\": \"/v1/channels\",\n \"summary\": \"Create a channel\",\n \"tag\": \"Alerts\",\n \"params\": [],\n \"body\": {\n \"fields\": [\n {\n \"name\": \"kind\",\n \"type\": \"string\",\n \"enum\": [\n \"slack\",\n \"email\",\n \"webhook\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"channelId\",\n \"type\": \"string\",\n \"description\": \"A Slack channel id from the connected workspace.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"channelName\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"emails\",\n \"type\": \"array\",\n \"description\": \"Each address gets a confirmation link; workspace members are confirmed on sight.\",\n \"required\": false,\n \"nullable\": false,\n \"items\": \"string\"\n },\n {\n \"name\": \"url\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"label\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"headers\",\n \"type\": \"object\",\n \"required\": false,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n }\n];\n","/**\n * What the CLI prints. JSON always, compact when piped and indented on a\n * terminal or with --pretty, so `mentio ... | jq` and a human both get what\n * they expect. --table renders a list's `data` as columns for a quick look.\n */\nexport interface OutputOptions {\n pretty: boolean;\n table: boolean;\n}\n\ntype Scalar = string | number | boolean | null;\n\nconst isScalar = (v: unknown): v is Scalar => v === null || ['string', 'number', 'boolean'].includes(typeof v);\n\nconst cell = (v: Scalar): string => {\n if (v === null) return '';\n if (typeof v === 'string') return v.length > 48 ? `${v.slice(0, 47)}…` : v.replace(/\\s+/g, ' ');\n return String(v);\n};\n\n/** Rows to a fixed-width table over the scalar columns of the first row. */\nexport function renderTable(rows: ReadonlyArray<Record<string, unknown>>): string {\n const first = rows[0];\n if (!first) return '(no rows)';\n const columns = Object.keys(first).filter((k) => isScalar(first[k])).slice(0, 8);\n if (columns.length === 0) return JSON.stringify(rows, null, 2);\n const lines = rows.map((row) => columns.map((c) => cell(isScalar(row[c]) ? (row[c] as Scalar) : JSON.stringify(row[c]))));\n const widths = columns.map((c, i) => Math.max(c.length, ...lines.map((l) => l[i]?.length ?? 0)));\n const pad = (s: string, w: number): string => s.padEnd(w);\n const header = columns.map((c, i) => pad(c, widths[i] ?? c.length)).join(' ');\n const rule = widths.map((w) => '-'.repeat(w)).join(' ');\n const body = lines.map((l) => l.map((s, i) => pad(s, widths[i] ?? s.length)).join(' '));\n return [header, rule, ...body].join('\\n');\n}\n\nexport function formatOutput(value: unknown, options: OutputOptions): string {\n if (options.table) {\n const rows = Array.isArray(value)\n ? value\n : value !== null && typeof value === 'object' && Array.isArray((value as { data?: unknown }).data)\n ? (value as { data: unknown[] }).data\n : null;\n if (rows && rows.every((r) => r !== null && typeof r === 'object')) {\n return renderTable(rows as Record<string, unknown>[]);\n }\n }\n return options.pretty ? JSON.stringify(value, null, 2) : JSON.stringify(value);\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen';\n\nexport type QuerySerializer = (query: Record<string, unknown>) => string;\n\nexport type BodySerializer = (body: unknown) => unknown;\n\ntype QuerySerializerOptionsObject = {\n allowReserved?: boolean;\n array?: Partial<SerializerOptions<ArrayStyle>>;\n object?: Partial<SerializerOptions<ObjectStyle>>;\n};\n\nexport type QuerySerializerOptions = QuerySerializerOptionsObject & {\n /**\n * Per-parameter serialization overrides. When provided, these settings\n * override the global array/object settings for specific parameter names.\n */\n parameters?: Record<string, QuerySerializerOptionsObject>;\n};\n\nconst serializeFormDataPair = (data: FormData, key: string, value: unknown): void => {\n if (typeof value === 'string' || value instanceof Blob) {\n data.append(key, value);\n } else if (value instanceof Date) {\n data.append(key, value.toISOString());\n } else {\n data.append(key, JSON.stringify(value));\n }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown): void => {\n if (typeof value === 'string') {\n data.append(key, value);\n } else {\n data.append(key, JSON.stringify(value));\n }\n};\n\nexport const formDataBodySerializer = {\n bodySerializer: (body: unknown): FormData => {\n const data = new FormData();\n\n Object.entries(body as Record<string, unknown>).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((v) => serializeFormDataPair(data, key, v));\n } else {\n serializeFormDataPair(data, key, value);\n }\n });\n\n return data;\n },\n};\n\nexport const jsonBodySerializer = {\n bodySerializer: (body: unknown): string =>\n JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n bodySerializer: (body: unknown): string => {\n const data = new URLSearchParams();\n\n Object.entries(body as Record<string, unknown>).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((v) => serializeUrlSearchParamsPair(data, key, v));\n } else {\n serializeUrlSearchParamsPair(data, key, value);\n }\n });\n\n return data.toString();\n },\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\ntype Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n | {\n in: Exclude<Slot, 'body'>;\n /**\n * Field name. This is the name we want the user to see and use.\n */\n key: string;\n /**\n * Field mapped name. This is the name we want to use in the request.\n * If omitted, we use the same value as `key`.\n */\n map?: string;\n }\n | {\n in: Extract<Slot, 'body'>;\n /**\n * Key isn't required for bodies.\n */\n key?: string;\n map?: string;\n }\n | {\n /**\n * Field name. This is the name we want the user to see and use.\n */\n key: string;\n /**\n * Field mapped name. This is the name we want to use in the request.\n * If `in` is omitted, `map` aliases `key` to the transport layer.\n */\n map: Slot;\n };\n\nexport interface Fields {\n allowExtra?: Partial<Record<Slot, boolean>>;\n args?: ReadonlyArray<Field>;\n}\n\nexport type FieldsConfig = ReadonlyArray<Field | Fields>;\n\nconst extraPrefixesMap: Record<string, Slot> = {\n $body_: 'body',\n $headers_: 'headers',\n $path_: 'path',\n $query_: 'query',\n};\nconst extraPrefixes = Object.entries(extraPrefixesMap);\n\ntype KeyMap = Map<\n string,\n | {\n in: Slot;\n map?: string;\n }\n | {\n in?: never;\n map: Slot;\n }\n>;\n\nfunction buildKeyMap(fields: FieldsConfig, map?: KeyMap): KeyMap {\n if (!map) {\n map = new Map();\n }\n\n for (const config of fields) {\n if ('in' in config) {\n if (config.key) {\n map.set(config.key, {\n in: config.in,\n map: config.map,\n });\n }\n } else if ('key' in config) {\n map.set(config.key, {\n map: config.map,\n });\n } else if (config.args) {\n buildKeyMap(config.args, map);\n }\n }\n\n return map;\n}\n\ninterface Params {\n body?: unknown;\n headers: Record<string, unknown>;\n path: Record<string, unknown>;\n query: Record<string, unknown>;\n}\n\nfunction stripEmptySlots(params: Params): void {\n for (const [slot, value] of Object.entries(params)) {\n if (slot === 'body') continue;\n if (value && typeof value === 'object' && !Array.isArray(value) && !Object.keys(value).length) {\n delete params[slot as Slot];\n }\n }\n}\n\nexport function buildClientParams(args: ReadonlyArray<unknown>, fields: FieldsConfig): Params {\n const params: Params = {\n headers: Object.create(null),\n path: Object.create(null),\n query: Object.create(null),\n };\n\n const map = buildKeyMap(fields);\n\n function writeSlot(slot: Slot, key: string, value: unknown): void {\n let record = params[slot] as Record<string, unknown> | undefined;\n if (record === undefined) {\n record = Object.create(null) as Record<string, unknown>;\n params[slot] = record;\n }\n record[key] = value;\n }\n\n let config: FieldsConfig[number] | undefined;\n\n for (const [index, arg] of args.entries()) {\n if (fields[index]) {\n config = fields[index];\n }\n\n if (!config) {\n continue;\n }\n\n if ('in' in config) {\n if (config.key) {\n const field = map.get(config.key)!;\n const name = field.map || config.key;\n if (field.in) {\n writeSlot(field.in, name, arg);\n }\n } else {\n params.body = arg;\n }\n } else {\n for (const [key, value] of Object.entries(arg ?? {})) {\n const field = map.get(key);\n\n if (field) {\n if (field.in) {\n const name = field.map || key;\n writeSlot(field.in, name, value);\n } else {\n params[field.map] = value;\n }\n } else {\n const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));\n\n if (extra) {\n const [prefix, slot] = extra;\n writeSlot(slot, key.slice(prefix.length), value);\n } else if ('allowExtra' in config && config.allowExtra) {\n for (const [slot, allowed] of Object.entries(config.allowExtra)) {\n if (allowed) {\n writeSlot(slot as Slot, key, value);\n break;\n }\n }\n }\n }\n }\n }\n }\n\n stripEmptySlots(params);\n\n return params;\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen';\n\nexport type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> &\n Pick<Config, 'method' | 'responseTransformer' | 'responseValidator'> & {\n /**\n * Fetch API implementation. You can use this option to provide a custom\n * fetch instance.\n *\n * @default globalThis.fetch\n */\n fetch?: typeof fetch;\n /**\n * Implementing clients can call request interceptors inside this hook.\n */\n onRequest?: (url: string, init: RequestInit) => Promise<Request>;\n /**\n * Callback invoked when a network or parsing error occurs during streaming.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @param error The error that occurred.\n */\n onSseError?: (error: unknown) => void;\n /**\n * Callback invoked when an event is streamed from the server.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @param event Event streamed from the server.\n * @returns Nothing (void).\n */\n onSseEvent?: (event: StreamEvent<TData>) => void;\n serializedBody?: RequestInit['body'];\n /**\n * Default retry delay in milliseconds.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @default 3000\n */\n sseDefaultRetryDelay?: number;\n /**\n * Maximum number of retry attempts before giving up.\n */\n sseMaxRetryAttempts?: number;\n /**\n * Maximum retry delay in milliseconds.\n *\n * Applies only when exponential backoff is used.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @default 30000\n */\n sseMaxRetryDelay?: number;\n /**\n * Optional sleep function for retry backoff.\n *\n * Defaults to using `setTimeout`.\n */\n sseSleepFn?: (ms: number) => Promise<void>;\n url: string;\n };\n\nexport interface StreamEvent<TData = unknown> {\n data: TData;\n event?: string;\n id?: string;\n retry?: number;\n}\n\nexport type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {\n stream: AsyncGenerator<\n TData extends Record<string, unknown> ? TData[keyof TData] : TData,\n TReturn,\n TNext\n >;\n};\n\nexport function createSseClient<TData = unknown>({\n onRequest,\n onSseError,\n onSseEvent,\n responseTransformer,\n responseValidator,\n sseDefaultRetryDelay,\n sseMaxRetryAttempts,\n sseMaxRetryDelay,\n sseSleepFn,\n url,\n ...options\n}: ServerSentEventsOptions): ServerSentEventsResult<TData> {\n let lastEventId: string | undefined;\n\n const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms)));\n\n const createStream = async function* () {\n let retryDelay: number = sseDefaultRetryDelay ?? 3000;\n let attempt = 0;\n const signal = options.signal ?? new AbortController().signal;\n\n while (true) {\n if (signal.aborted) break;\n\n attempt++;\n\n const headers =\n options.headers instanceof Headers\n ? options.headers\n : new Headers(options.headers as Record<string, string> | undefined);\n\n if (lastEventId !== undefined) {\n headers.set('Last-Event-ID', lastEventId);\n }\n\n try {\n const requestInit: RequestInit = {\n redirect: 'follow',\n ...options,\n body: options.serializedBody,\n headers,\n signal,\n };\n let request = new Request(url, requestInit);\n if (onRequest) {\n request = await onRequest(url, requestInit);\n }\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = options.fetch ?? globalThis.fetch;\n const response = await _fetch(request);\n\n if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);\n\n if (!response.body) throw new Error('No body in SSE response');\n\n const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();\n\n let buffer = '';\n\n const abortHandler = () => {\n try {\n reader.cancel();\n } catch {\n // noop\n }\n };\n\n signal.addEventListener('abort', abortHandler);\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n buffer += value;\n buffer = buffer.replace(/\\r\\n?/g, '\\n'); // normalize line endings\n\n const chunks = buffer.split('\\n\\n');\n buffer = chunks.pop() ?? '';\n\n for (const chunk of chunks) {\n const lines = chunk.split('\\n');\n const dataLines: Array<string> = [];\n let eventName: string | undefined;\n\n for (const line of lines) {\n if (line.startsWith('data:')) {\n dataLines.push(line.replace(/^data:\\s*/, ''));\n } else if (line.startsWith('event:')) {\n eventName = line.replace(/^event:\\s*/, '');\n } else if (line.startsWith('id:')) {\n lastEventId = line.replace(/^id:\\s*/, '');\n } else if (line.startsWith('retry:')) {\n const parsed = Number.parseInt(line.replace(/^retry:\\s*/, ''), 10);\n if (!Number.isNaN(parsed)) {\n retryDelay = parsed;\n }\n }\n }\n\n let data: unknown;\n let parsedJson = false;\n\n if (dataLines.length) {\n const rawData = dataLines.join('\\n');\n try {\n data = JSON.parse(rawData);\n parsedJson = true;\n } catch {\n data = rawData;\n }\n }\n\n if (parsedJson) {\n if (responseValidator) {\n await responseValidator(data);\n }\n\n if (responseTransformer) {\n data = await responseTransformer(data);\n }\n }\n\n onSseEvent?.({\n data,\n event: eventName,\n id: lastEventId,\n retry: retryDelay,\n });\n\n if (dataLines.length) {\n yield data as any;\n }\n }\n }\n } finally {\n signal.removeEventListener('abort', abortHandler);\n reader.releaseLock();\n }\n\n break; // exit loop on normal completion\n } catch (error) {\n // connection failed or aborted; retry after delay\n onSseError?.(error);\n\n if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {\n break; // stop after firing error\n }\n\n // exponential backoff: double retry each attempt, cap at 30s\n const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);\n await sleep(backoff);\n }\n }\n };\n\n const stream = createStream();\n\n return { stream };\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\ninterface SerializeOptions<T> extends SerializePrimitiveOptions, SerializerOptions<T> {}\n\ninterface SerializePrimitiveOptions {\n allowReserved?: boolean;\n name: string;\n}\n\nexport interface SerializerOptions<T> {\n /**\n * @default true\n */\n explode: boolean;\n style: T;\n}\n\nexport type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectStyle = 'form' | 'deepObject';\ntype ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\n\ninterface SerializePrimitiveParam extends SerializePrimitiveOptions {\n value: string;\n}\n\nexport const separatorArrayExplode = (style: ArraySeparatorStyle): '.' | ';' | ',' | '&' => {\n switch (style) {\n case 'label':\n return '.';\n case 'matrix':\n return ';';\n case 'simple':\n return ',';\n default:\n return '&';\n }\n};\n\nexport const separatorArrayNoExplode = (style: ArraySeparatorStyle): ',' | '|' | '%20' => {\n switch (style) {\n case 'form':\n return ',';\n case 'pipeDelimited':\n return '|';\n case 'spaceDelimited':\n return '%20';\n default:\n return ',';\n }\n};\n\nexport const separatorObjectExplode = (style: ObjectSeparatorStyle): '.' | ';' | ',' | '&' => {\n switch (style) {\n case 'label':\n return '.';\n case 'matrix':\n return ';';\n case 'simple':\n return ',';\n default:\n return '&';\n }\n};\n\nexport const serializeArrayParam = ({\n allowReserved,\n explode,\n name,\n style,\n value,\n}: SerializeOptions<ArraySeparatorStyle> & {\n value: unknown[];\n}): string => {\n if (!explode) {\n const joinedValues = (\n allowReserved ? value : value.map((v) => encodeURIComponent(v as string))\n ).join(separatorArrayNoExplode(style));\n switch (style) {\n case 'label':\n return `.${joinedValues}`;\n case 'matrix':\n return `;${name}=${joinedValues}`;\n case 'simple':\n return joinedValues;\n default:\n return `${name}=${joinedValues}`;\n }\n }\n\n const separator = separatorArrayExplode(style);\n const joinedValues = value\n .map((v) => {\n if (style === 'label' || style === 'simple') {\n return allowReserved ? v : encodeURIComponent(v as string);\n }\n\n return serializePrimitiveParam({\n allowReserved,\n name,\n value: v as string,\n });\n })\n .join(separator);\n return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;\n};\n\nexport const serializePrimitiveParam = ({\n allowReserved,\n name,\n value,\n}: SerializePrimitiveParam): string => {\n if (value === undefined || value === null) {\n return '';\n }\n\n if (typeof value === 'object') {\n throw new Error(\n 'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.',\n );\n }\n\n return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;\n};\n\nexport const serializeObjectParam = ({\n allowReserved,\n explode,\n name,\n style,\n value,\n valueOnly,\n}: SerializeOptions<ObjectSeparatorStyle> & {\n value: Record<string, unknown> | Date;\n valueOnly?: boolean;\n}): string => {\n if (value instanceof Date) {\n return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;\n }\n\n if (style !== 'deepObject' && !explode) {\n let values: string[] = [];\n Object.entries(value).forEach(([key, v]) => {\n values = [...values, key, allowReserved ? (v as string) : encodeURIComponent(v as string)];\n });\n const joinedValues = values.join(',');\n switch (style) {\n case 'form':\n return `${name}=${joinedValues}`;\n case 'label':\n return `.${joinedValues}`;\n case 'matrix':\n return `;${name}=${joinedValues}`;\n default:\n return joinedValues;\n }\n }\n\n const separator = separatorObjectExplode(style);\n const joinedValues = Object.entries(value)\n .map(([key, v]) =>\n serializePrimitiveParam({\n allowReserved,\n name: style === 'deepObject' ? `${name}[${key}]` : key,\n value: v as string,\n }),\n )\n .join(separator);\n return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen';\nimport {\n type ArraySeparatorStyle,\n serializeArrayParam,\n serializeObjectParam,\n serializePrimitiveParam,\n} from './pathSerializer.gen';\n\nexport interface PathSerializer {\n path: Record<string, unknown>;\n url: string;\n}\n\nexport const PATH_PARAM_RE: RegExp = /\\{[^{}]+\\}/g;\n\nexport const defaultPathSerializer = ({ path, url: _url }: PathSerializer): string => {\n let url = _url;\n const matches = _url.match(PATH_PARAM_RE);\n if (matches) {\n for (const match of matches) {\n let explode = false;\n let name = match.substring(1, match.length - 1);\n let style: ArraySeparatorStyle = 'simple';\n\n if (name.endsWith('*')) {\n explode = true;\n name = name.substring(0, name.length - 1);\n }\n\n if (name.startsWith('.')) {\n name = name.substring(1);\n style = 'label';\n } else if (name.startsWith(';')) {\n name = name.substring(1);\n style = 'matrix';\n }\n\n const value = path[name];\n\n if (value === undefined || value === null) {\n continue;\n }\n\n if (Array.isArray(value)) {\n url = url.replace(match, serializeArrayParam({ explode, name, style, value }));\n continue;\n }\n\n if (typeof value === 'object') {\n url = url.replace(\n match,\n serializeObjectParam({\n explode,\n name,\n style,\n value: value as Record<string, unknown>,\n valueOnly: true,\n }),\n );\n continue;\n }\n\n if (style === 'matrix') {\n url = url.replace(\n match,\n `;${serializePrimitiveParam({\n name,\n value: value as string,\n })}`,\n );\n continue;\n }\n\n const replaceValue = encodeURIComponent(\n style === 'label' ? `.${value as string}` : (value as string),\n );\n url = url.replace(match, replaceValue);\n }\n }\n return url;\n};\n\nexport const getUrl = ({\n baseUrl,\n path,\n query,\n querySerializer,\n url: _url,\n}: {\n baseUrl?: string;\n path?: Record<string, unknown>;\n query?: Record<string, unknown>;\n querySerializer: QuerySerializer;\n url: string;\n}): string => {\n const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;\n let url = (baseUrl ?? '') + pathUrl;\n if (path) {\n url = defaultPathSerializer({ path, url });\n }\n let search = query ? querySerializer(query) : '';\n if (search.startsWith('?')) {\n search = search.substring(1);\n }\n if (search) {\n url += `?${search}`;\n }\n return url;\n};\n\nexport function getValidRequestBody(options: {\n body?: unknown;\n bodySerializer?: BodySerializer | null;\n serializedBody?: unknown;\n}): unknown {\n const hasBody = options.body !== undefined;\n const isSerializedBody = hasBody && options.bodySerializer;\n\n if (isSerializedBody) {\n if ('serializedBody' in options) {\n const hasSerializedBody =\n options.serializedBody !== undefined && options.serializedBody !== '';\n\n return hasSerializedBody ? options.serializedBody : null;\n }\n\n // not all clients implement a serializedBody property (i.e., client-axios)\n return options.body !== '' ? options.body : null;\n }\n\n // plain/text body\n if (hasBody) {\n return options.body;\n }\n\n // no body was provided\n return undefined;\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nexport type AuthToken = string | undefined;\n\nexport interface Auth {\n /**\n * Which part of the request do we use to send the auth?\n *\n * @default 'header'\n */\n in?: 'header' | 'query' | 'cookie';\n /**\n * A unique identifier for the security scheme.\n *\n * Defined only when there are multiple security schemes whose `Auth`\n * shape would otherwise be identical.\n */\n key?: string;\n /**\n * Header or query parameter name.\n *\n * @default 'Authorization'\n */\n name?: string;\n scheme?: 'basic' | 'bearer';\n type: 'apiKey' | 'http';\n}\n\nexport const getAuthToken = async (\n auth: Auth,\n callback: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken,\n): Promise<string | undefined> => {\n const token = typeof callback === 'function' ? await callback(auth) : callback;\n\n if (!token) {\n return;\n }\n\n if (auth.scheme === 'bearer') {\n return `Bearer ${token}`;\n }\n\n if (auth.scheme === 'basic') {\n return `Basic ${btoa(token)}`;\n }\n\n return token;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n serializeArrayParam,\n serializeObjectParam,\n serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport { getUrl } from '../core/utils.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\nexport const createQuerySerializer = <T = unknown>({\n parameters = {},\n ...args\n}: QuerySerializerOptions = {}): ((queryParams: T) => string) => {\n const querySerializer = (queryParams: T): string => {\n const search: string[] = [];\n if (queryParams && typeof queryParams === 'object') {\n for (const name in queryParams) {\n const value = queryParams[name];\n\n if (value === undefined || value === null) {\n continue;\n }\n\n const options = parameters[name] || args;\n\n if (Array.isArray(value)) {\n const serializedArray = serializeArrayParam({\n allowReserved: options.allowReserved,\n explode: true,\n name,\n style: 'form',\n value,\n ...options.array,\n });\n if (serializedArray) search.push(serializedArray);\n } else if (typeof value === 'object') {\n const serializedObject = serializeObjectParam({\n allowReserved: options.allowReserved,\n explode: true,\n name,\n style: 'deepObject',\n value: value as Record<string, unknown>,\n ...options.object,\n });\n if (serializedObject) search.push(serializedObject);\n } else {\n const serializedPrimitive = serializePrimitiveParam({\n allowReserved: options.allowReserved,\n name,\n value: value as string,\n });\n if (serializedPrimitive) search.push(serializedPrimitive);\n }\n }\n }\n return search.join('&');\n };\n return querySerializer;\n};\n\n/**\n * Infers parseAs value from provided Content-Type header.\n */\nexport const getParseAs = (contentType: string | null): Exclude<Config['parseAs'], 'auto'> => {\n if (!contentType) {\n // If no Content-Type header is provided, the best we can do is return the raw response body,\n // which is effectively the same as the 'stream' option.\n return 'stream';\n }\n\n const cleanContent = contentType.split(';')[0]?.trim();\n\n if (!cleanContent) {\n return;\n }\n\n if (cleanContent.startsWith('application/json') || cleanContent.endsWith('+json')) {\n return 'json';\n }\n\n if (cleanContent === 'multipart/form-data') {\n return 'formData';\n }\n\n if (\n ['application/', 'audio/', 'image/', 'video/'].some((type) => cleanContent.startsWith(type))\n ) {\n return 'blob';\n }\n\n if (cleanContent.startsWith('text/')) {\n return 'text';\n }\n\n return;\n};\n\nconst checkForExistence = (\n options: Pick<RequestOptions, 'auth' | 'query'> & {\n headers: Headers;\n },\n name?: string,\n): boolean => {\n if (!name) {\n return false;\n }\n if (\n options.headers.has(name) ||\n options.query?.[name] ||\n options.headers.get('Cookie')?.includes(`${name}=`)\n ) {\n return true;\n }\n return false;\n};\n\nexport async function setAuthParams(\n options: Pick<RequestOptions, 'auth' | 'query' | 'security'> & {\n headers: Headers;\n },\n): Promise<void> {\n for (const auth of options.security ?? []) {\n if (checkForExistence(options, auth.name)) {\n continue;\n }\n\n const token = await getAuthToken(auth, options.auth);\n\n if (!token) {\n continue;\n }\n\n const name = auth.name ?? 'Authorization';\n\n switch (auth.in) {\n case 'query':\n if (!options.query) {\n options.query = {};\n }\n options.query[name] = token;\n break;\n case 'cookie':\n options.headers.append('Cookie', `${name}=${token}`);\n break;\n case 'header':\n default:\n options.headers.set(name, token);\n break;\n }\n }\n}\n\nexport const buildUrl: Client['buildUrl'] = (options) =>\n getUrl({\n baseUrl: options.baseUrl as string,\n path: options.path,\n query: options.query,\n querySerializer:\n typeof options.querySerializer === 'function'\n ? options.querySerializer\n : createQuerySerializer(options.querySerializer),\n url: options.url,\n });\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n const config = { ...a, ...b };\n if (config.baseUrl?.endsWith('/')) {\n config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);\n }\n config.headers = mergeHeaders(a.headers, b.headers);\n return config;\n};\n\nconst headersEntries = (headers: Headers): Array<[string, string]> => {\n const entries: Array<[string, string]> = [];\n headers.forEach((value, key) => {\n entries.push([key, value]);\n });\n return entries;\n};\n\nexport const mergeHeaders = (\n ...headers: Array<Required<Config>['headers'] | undefined>\n): Headers => {\n const mergedHeaders = new Headers();\n for (const header of headers) {\n if (!header) {\n continue;\n }\n\n const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);\n\n for (const [key, value] of iterator) {\n if (value === null) {\n mergedHeaders.delete(key);\n } else if (Array.isArray(value)) {\n for (const v of value) {\n mergedHeaders.append(key, v as string);\n }\n } else if (value !== undefined) {\n // assume object headers are meant to be JSON stringified, i.e., their\n // content value in OpenAPI specification is 'application/json'\n mergedHeaders.set(\n key,\n typeof value === 'object' ? JSON.stringify(value) : (value as string),\n );\n }\n }\n }\n return mergedHeaders;\n};\n\ntype ErrInterceptor<Err, Res, Req, Options> = (\n error: Err,\n /** response may be undefined due to a network error where no response object is produced */\n response: Res | undefined,\n /** request may be undefined, because error may be from building the request object itself */\n request: Req | undefined,\n options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;\n\ntype ResInterceptor<Res, Req, Options> = (\n response: Res,\n request: Req,\n options: Options,\n) => Res | Promise<Res>;\n\nclass Interceptors<Interceptor> {\n fns: Array<Interceptor | null> = [];\n\n clear(): void {\n this.fns = [];\n }\n\n eject(id: number | Interceptor): void {\n const index = this.getInterceptorIndex(id);\n if (this.fns[index]) {\n this.fns[index] = null;\n }\n }\n\n exists(id: number | Interceptor): boolean {\n const index = this.getInterceptorIndex(id);\n return Boolean(this.fns[index]);\n }\n\n getInterceptorIndex(id: number | Interceptor): number {\n if (typeof id === 'number') {\n return this.fns[id] ? id : -1;\n }\n return this.fns.indexOf(id);\n }\n\n update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false {\n const index = this.getInterceptorIndex(id);\n if (this.fns[index]) {\n this.fns[index] = fn;\n return id;\n }\n return false;\n }\n\n use(fn: Interceptor): number {\n this.fns.push(fn);\n return this.fns.length - 1;\n }\n}\n\nexport interface Middleware<Req, Res, Err, Options> {\n error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;\n request: Interceptors<ReqInterceptor<Req, Options>>;\n response: Interceptors<ResInterceptor<Res, Req, Options>>;\n}\n\nexport const createInterceptors = <Req, Res, Err, Options>(): Middleware<\n Req,\n Res,\n Err,\n Options\n> => ({\n error: new Interceptors<ErrInterceptor<Err, Res, Req, Options>>(),\n request: new Interceptors<ReqInterceptor<Req, Options>>(),\n response: new Interceptors<ResInterceptor<Res, Req, Options>>(),\n});\n\nconst defaultQuerySerializer = createQuerySerializer({\n allowReserved: false,\n array: {\n explode: true,\n style: 'form',\n },\n object: {\n explode: true,\n style: 'deepObject',\n },\n});\n\nconst defaultHeaders = {\n 'Content-Type': 'application/json',\n};\n\nexport const createConfig = <T extends ClientOptions = ClientOptions>(\n override: Config<Omit<ClientOptions, keyof T> & T> = {},\n): Config<Omit<ClientOptions, keyof T> & T> => ({\n ...jsonBodySerializer,\n headers: defaultHeaders,\n parseAs: 'auto',\n querySerializer: defaultQuerySerializer,\n ...override,\n});\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen';\nimport {\n buildUrl,\n createConfig,\n createInterceptors,\n getParseAs,\n mergeConfigs,\n mergeHeaders,\n setAuthParams,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n body?: any;\n headers: ReturnType<typeof mergeHeaders>;\n};\n\nexport const createClient = (config: Config = {}): Client => {\n let _config = mergeConfigs(createConfig(), config);\n\n const getConfig = (): Config => ({ ..._config });\n\n const setConfig = (config: Config): Config => {\n _config = mergeConfigs(_config, config);\n return getConfig();\n };\n\n const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();\n\n const beforeRequest = async <\n TData = unknown,\n TResponseStyle extends 'data' | 'fields' = 'fields',\n ThrowOnError extends boolean = boolean,\n Url extends string = string,\n >(\n options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,\n ) => {\n const opts = {\n ..._config,\n ...options,\n fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n headers: mergeHeaders(_config.headers, options.headers),\n serializedBody: undefined as string | undefined,\n };\n\n if (opts.security) {\n await setAuthParams(opts);\n }\n\n if (opts.requestValidator) {\n await opts.requestValidator(opts);\n }\n\n if (opts.body !== undefined && opts.bodySerializer) {\n opts.serializedBody = opts.bodySerializer(opts.body) as string | undefined;\n }\n\n // remove Content-Type header if body is empty to avoid sending invalid requests\n if (opts.body === undefined || opts.serializedBody === '') {\n opts.headers.delete('Content-Type');\n }\n\n const resolvedOpts = opts as typeof opts &\n ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>;\n const url = buildUrl(resolvedOpts);\n\n return { opts: resolvedOpts, url };\n };\n\n const request: Client['request'] = async (options) => {\n const throwOnError = options.throwOnError ?? _config.throwOnError;\n const responseStyle = options.responseStyle ?? _config.responseStyle;\n\n let request: Request | undefined;\n let response: Response | undefined;\n\n try {\n const { opts, url } = await beforeRequest(options);\n const requestInit: ReqInit = {\n redirect: 'follow',\n ...opts,\n body: getValidRequestBody(opts),\n };\n\n request = new Request(url, requestInit);\n\n for (const fn of interceptors.request.fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = opts.fetch!;\n\n response = await _fetch(request);\n\n for (const fn of interceptors.response.fns) {\n if (fn) {\n response = await fn(response, request, opts);\n }\n }\n\n const result = {\n request,\n response,\n };\n\n if (response.ok) {\n const parseAs =\n (opts.parseAs === 'auto'\n ? getParseAs(response.headers.get('Content-Type'))\n : opts.parseAs) ?? 'json';\n\n if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n let emptyData: any;\n switch (parseAs) {\n case 'arrayBuffer':\n case 'blob':\n case 'text':\n emptyData = await response[parseAs]();\n break;\n case 'formData':\n emptyData = new FormData();\n break;\n case 'stream':\n emptyData = response.body;\n break;\n case 'json':\n default:\n emptyData = {};\n break;\n }\n return opts.responseStyle === 'data'\n ? emptyData\n : {\n data: emptyData,\n ...result,\n };\n }\n\n let data: any;\n switch (parseAs) {\n case 'arrayBuffer':\n case 'blob':\n case 'formData':\n case 'text':\n data = await response[parseAs]();\n break;\n case 'json': {\n // Some servers return 200 with no Content-Length and empty body.\n // response.json() would throw; read as text and parse if non-empty.\n const text = await response.text();\n data = text ? JSON.parse(text) : {};\n break;\n }\n case 'stream':\n return opts.responseStyle === 'data'\n ? response.body\n : {\n data: response.body,\n ...result,\n };\n }\n\n if (parseAs === 'json') {\n if (opts.responseValidator) {\n await opts.responseValidator(data);\n }\n\n if (opts.responseTransformer) {\n data = await opts.responseTransformer(data);\n }\n }\n\n return opts.responseStyle === 'data'\n ? data\n : {\n data,\n ...result,\n };\n }\n\n const textError = await response.text();\n let jsonError: unknown;\n\n try {\n jsonError = JSON.parse(textError);\n } catch {\n // noop\n }\n\n throw jsonError ?? textError;\n } catch (error) {\n let finalError = error;\n\n for (const fn of interceptors.error.fns) {\n if (fn) {\n finalError = await fn(finalError, response, request, options as ResolvedRequestOptions);\n }\n }\n\n finalError = finalError || {};\n\n if (throwOnError) {\n throw finalError;\n }\n\n // TODO: we probably want to return error and improve types\n return responseStyle === 'data'\n ? undefined\n : {\n error: finalError,\n request,\n response,\n };\n }\n };\n\n const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n request({ ...options, method });\n\n const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n const { opts, url } = await beforeRequest(options);\n return createSseClient({\n ...opts,\n body: opts.body as BodyInit | null | undefined,\n method,\n onRequest: async (url, init) => {\n let request = new Request(url, init);\n for (const fn of interceptors.request.fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n return request;\n },\n serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n url,\n });\n };\n\n const _buildUrl: Client['buildUrl'] = (options) => buildUrl({ ..._config, ...options });\n\n return {\n buildUrl: _buildUrl,\n connect: makeMethodFn('CONNECT'),\n delete: makeMethodFn('DELETE'),\n get: makeMethodFn('GET'),\n getConfig,\n head: makeMethodFn('HEAD'),\n interceptors,\n options: makeMethodFn('OPTIONS'),\n patch: makeMethodFn('PATCH'),\n post: makeMethodFn('POST'),\n put: makeMethodFn('PUT'),\n request,\n setConfig,\n sse: {\n connect: makeSseFn('CONNECT'),\n delete: makeSseFn('DELETE'),\n get: makeSseFn('GET'),\n head: makeSseFn('HEAD'),\n options: makeSseFn('OPTIONS'),\n patch: makeSseFn('PATCH'),\n post: makeSseFn('POST'),\n put: makeSseFn('PUT'),\n trace: makeSseFn('TRACE'),\n },\n trace: makeMethodFn('TRACE'),\n } as Client;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { CreateAlertData, CreateAlertErrors, CreateAlertResponses, CreateApiKeyData, CreateApiKeyErrors, CreateApiKeyResponses, CreateChannelData, CreateChannelErrors, CreateChannelResponses, CreateKeywordData, CreateKeywordErrors, CreateKeywordResponses, CreateSegmentData, CreateSegmentErrors, CreateSegmentResponses, DeleteAlertData, DeleteAlertErrors, DeleteAlertResponses, DeleteChannelData, DeleteChannelErrors, DeleteChannelResponses, DeleteKeywordData, DeleteKeywordErrors, DeleteKeywordResponses, DeleteSegmentData, DeleteSegmentErrors, DeleteSegmentResponses, ExportMentionsCsvData, ExportMentionsCsvErrors, ExportMentionsCsvResponses, ExportPeopleCsvData, ExportPeopleCsvErrors, ExportPeopleCsvResponses, GetAlertData, GetAlertErrors, GetAlertResponses, GetAnalyticsBreakdownData, GetAnalyticsBreakdownErrors, GetAnalyticsBreakdownResponses, GetAnalyticsSeriesData, GetAnalyticsSeriesErrors, GetAnalyticsSeriesResponses, GetAnalyticsSummaryData, GetAnalyticsSummaryErrors, GetAnalyticsSummaryResponses, GetChannelData, GetChannelErrors, GetChannelResponses, GetCompanyData, GetCompanyErrors, GetCompanyResponses, GetHealthData, GetHealthResponses, GetKeywordData, GetKeywordErrors, GetKeywordResponses, GetMentionData, GetMentionErrors, GetMentionResponses, GetPersonData, GetPersonErrors, GetPersonResponses, GetSegmentData, GetSegmentErrors, GetSegmentResponses, GetShareOfVoiceData, GetShareOfVoiceErrors, GetShareOfVoiceResponses, ListAlertsData, ListAlertsErrors, ListAlertsResponses, ListApiKeysData, ListApiKeysErrors, ListApiKeysResponses, ListChannelDeliveriesData, ListChannelDeliveriesErrors, ListChannelDeliveriesResponses, ListChannelsData, ListChannelsErrors, ListChannelsResponses, ListKeywordsData, ListKeywordsErrors, ListKeywordsResponses, ListPeopleData, ListPeopleErrors, ListPeopleResponses, ListSegmentsData, ListSegmentsErrors, ListSegmentsResponses, MergePeopleData, MergePeopleErrors, MergePeopleResponses, RevokeApiKeyData, RevokeApiKeyErrors, RevokeApiKeyResponses, RotateWebhookSecretData, RotateWebhookSecretErrors, RotateWebhookSecretResponses, RunAlertDigestData, RunAlertDigestErrors, RunAlertDigestResponses, SearchMentionsData, SearchMentionsErrors, SearchMentionsResponses, SplitPersonData, SplitPersonErrors, SplitPersonResponses, TestAlertData, TestAlertErrors, TestAlertResponses, TestChannelData, TestChannelErrors, TestChannelResponses, UpdateAlertData, UpdateAlertErrors, UpdateAlertResponses, UpdateChannelData, UpdateChannelErrors, UpdateChannelResponses, UpdateCompanyData, UpdateCompanyErrors, UpdateCompanyResponses, UpdateKeywordData, UpdateKeywordErrors, UpdateKeywordResponses, UpdateMentionData, UpdateMentionErrors, UpdateMentionResponses, UpdatePersonData, UpdatePersonErrors, UpdatePersonResponses, UpdateSegmentData, UpdateSegmentErrors, UpdateSegmentResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {\n /**\n * You can provide a client instance returned by `createClient()` instead of\n * individual options. This might be also useful if you want to implement a\n * custom client.\n */\n client?: Client;\n /**\n * You can pass arbitrary values through the `meta` object. This can be\n * used to access values that aren't defined as part of the SDK function.\n */\n meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;\n};\n\nexport const getHealth = <ThrowOnError extends boolean = false>(options?: Options<GetHealthData, ThrowOnError>): RequestResult<GetHealthResponses, unknown, ThrowOnError> => (options?.client ?? client).get<GetHealthResponses, unknown, ThrowOnError>({ url: '/v1/health', ...options });\n\n/**\n * List keywords\n *\n * Every keyword of the workspace, newest first, with its match stats and poll health.\n */\nexport const listKeywords = <ThrowOnError extends boolean = false>(options?: Options<ListKeywordsData, ThrowOnError>): RequestResult<ListKeywordsResponses, ListKeywordsErrors, ThrowOnError> => (options?.client ?? client).get<ListKeywordsResponses, ListKeywordsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords',\n ...options\n});\n\n/**\n * Track a keyword\n *\n * Start tracking a word or phrase. Matching, classification and delivery begin on the next poll. Free workspaces track 2 keywords; a subscription raises that to 500.\n */\nexport const createKeyword = <ThrowOnError extends boolean = false>(options: Options<CreateKeywordData, ThrowOnError>): RequestResult<CreateKeywordResponses, CreateKeywordErrors, ThrowOnError> => (options.client ?? client).post<CreateKeywordResponses, CreateKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a keyword\n *\n * Removes the keyword and its matches. Posts also matched by another keyword stay.\n */\nexport const deleteKeyword = <ThrowOnError extends boolean = false>(options: Options<DeleteKeywordData, ThrowOnError>): RequestResult<DeleteKeywordResponses, DeleteKeywordErrors, ThrowOnError> => (options.client ?? client).delete<DeleteKeywordResponses, DeleteKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}',\n ...options\n});\n\n/**\n * Get a keyword\n */\nexport const getKeyword = <ThrowOnError extends boolean = false>(options: Options<GetKeywordData, ThrowOnError>): RequestResult<GetKeywordResponses, GetKeywordErrors, ThrowOnError> => (options.client ?? client).get<GetKeywordResponses, GetKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}',\n ...options\n});\n\n/**\n * Update a keyword\n *\n * Mute or unmute it, or change the platforms it is tracked on.\n */\nexport const updateKeyword = <ThrowOnError extends boolean = false>(options: Options<UpdateKeywordData, ThrowOnError>): RequestResult<UpdateKeywordResponses, UpdateKeywordErrors, ThrowOnError> => (options.client ?? client).patch<UpdateKeywordResponses, UpdateKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Get a mention\n *\n * One mention by id, as it appears in the list: the post, its author with reach and your tags, the classification, the priority score and the triage fields. Ids belong to your organization; any other id is a 404.\n */\nexport const getMention = <ThrowOnError extends boolean = false>(options: Options<GetMentionData, ThrowOnError>): RequestResult<GetMentionResponses, GetMentionErrors, ThrowOnError> => (options.client ?? client).get<GetMentionResponses, GetMentionErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/{id}',\n ...options\n});\n\n/**\n * Update a mention\n *\n * The one write on a mention. Set status to ignored or done to handle it (open puts it back), assign it to a workspace member, snooze it out of the feed, or leave an internal note. Null clears a field; omitted fields are untouched. Delivery and billing never change.\n */\nexport const updateMention = <ThrowOnError extends boolean = false>(options: Options<UpdateMentionData, ThrowOnError>): RequestResult<UpdateMentionResponses, UpdateMentionErrors, ThrowOnError> => (options.client ?? client).patch<UpdateMentionResponses, UpdateMentionErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List mentions\n *\n * Mentions matched to your keywords, filtered and paginated. Default order is newest match first; sort=priority ranks by attention score. Page with nextCursor, passing the same filters and sort. A mention is one post matched to one keyword.\n */\nexport const searchMentions = <ThrowOnError extends boolean = false>(options?: Options<SearchMentionsData, ThrowOnError>): RequestResult<SearchMentionsResponses, SearchMentionsErrors, ThrowOnError> => (options?.client ?? client).get<SearchMentionsResponses, SearchMentionsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions',\n ...options\n});\n\n/**\n * Export mentions as CSV\n *\n * The same mentions GET /v1/mentions would list for these filters, as CSV, newest published first: id, published_at, platform, keyword, author, author_url, author_followers, relevance, sentiment, intents (pipe-separated), status, relevant, delivered, url, text (first 1,000 characters). Capped at 10,000 rows; the X-Mentions-Truncated header says when the cap cut the list.\n */\nexport const exportMentionsCsv = <ThrowOnError extends boolean = false>(options?: Options<ExportMentionsCsvData, ThrowOnError>): RequestResult<ExportMentionsCsvResponses, ExportMentionsCsvErrors, ThrowOnError> => (options?.client ?? client).get<ExportMentionsCsvResponses, ExportMentionsCsvErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/export.csv',\n ...options\n});\n\n/**\n * Export people as CSV\n *\n * The same list as GET /v1/people (segmentId included) as CSV, one row per person with their contact columns: handle, followers, email, website, company, location, tags. Capped at 5,000 people.\n */\nexport const exportPeopleCsv = <ThrowOnError extends boolean = false>(options?: Options<ExportPeopleCsvData, ThrowOnError>): RequestResult<ExportPeopleCsvResponses, ExportPeopleCsvErrors, ThrowOnError> => (options?.client ?? client).get<ExportPeopleCsvResponses, ExportPeopleCsvErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/export.csv',\n ...options\n});\n\n/**\n * List people\n *\n * The people behind your mentions: one row per person, with their accounts, reach, public profile, per-workspace stats and your annotations. Filter by platform, tag, follower range, mention counts, intents seen, keyword kinds mentioned or never mentioned, or a saved segment. Offset-paginated with a total.\n */\nexport const listPeople = <ThrowOnError extends boolean = false>(options?: Options<ListPeopleData, ThrowOnError>): RequestResult<ListPeopleResponses, ListPeopleErrors, ThrowOnError> => (options?.client ?? client).get<ListPeopleResponses, ListPeopleErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people',\n ...options\n});\n\n/**\n * Get a person\n *\n * One person as your workspace sees them. An account merged into someone resolves to that person.\n */\nexport const getPerson = <ThrowOnError extends boolean = false>(options: Options<GetPersonData, ThrowOnError>): RequestResult<GetPersonResponses, GetPersonErrors, ThrowOnError> => (options.client ?? client).get<GetPersonResponses, GetPersonErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}',\n ...options\n});\n\n/**\n * Update your annotations on a person\n *\n * Tags, notes and mute, for your workspace only. Mute hides their posts from your feed and every channel; ingest and billing never change.\n */\nexport const updatePerson = <ThrowOnError extends boolean = false>(options: Options<UpdatePersonData, ThrowOnError>): RequestResult<UpdatePersonResponses, UpdatePersonErrors, ThrowOnError> => (options.client ?? client).patch<UpdatePersonResponses, UpdatePersonErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Merge an account into a person\n *\n * Declare that this account and another person are the same human, for your workspace only. Their mentions, tags and notes combine under the person named by `into`.\n */\nexport const mergePeople = <ThrowOnError extends boolean = false>(options: Options<MergePeopleData, ThrowOnError>): RequestResult<MergePeopleResponses, MergePeopleErrors, ThrowOnError> => (options.client ?? client).post<MergePeopleResponses, MergePeopleErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}/merge',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Undo a merge\n *\n * The account becomes its own person again.\n */\nexport const splitPerson = <ThrowOnError extends boolean = false>(options: Options<SplitPersonData, ThrowOnError>): RequestResult<SplitPersonResponses, SplitPersonErrors, ThrowOnError> => (options.client ?? client).post<SplitPersonResponses, SplitPersonErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}/split',\n ...options\n});\n\n/**\n * List segments\n *\n * Your saved segments, each with the number of people in it right now (segments are evaluated on every read, never materialized), plus presets you can save as a starting point. Pass a segment id to GET /v1/people to list its members.\n */\nexport const listSegments = <ThrowOnError extends boolean = false>(options?: Options<ListSegmentsData, ThrowOnError>): RequestResult<ListSegmentsResponses, ListSegmentsErrors, ThrowOnError> => (options?.client ?? client).get<ListSegmentsResponses, ListSegmentsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments',\n ...options\n});\n\n/**\n * Create a segment\n */\nexport const createSegment = <ThrowOnError extends boolean = false>(options: Options<CreateSegmentData, ThrowOnError>): RequestResult<CreateSegmentResponses, CreateSegmentErrors, ThrowOnError> => (options.client ?? client).post<CreateSegmentResponses, CreateSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a segment\n *\n * Nobody in it is affected.\n */\nexport const deleteSegment = <ThrowOnError extends boolean = false>(options: Options<DeleteSegmentData, ThrowOnError>): RequestResult<DeleteSegmentResponses, DeleteSegmentErrors, ThrowOnError> => (options.client ?? client).delete<DeleteSegmentResponses, DeleteSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments/{id}',\n ...options\n});\n\n/**\n * Get a segment\n */\nexport const getSegment = <ThrowOnError extends boolean = false>(options: Options<GetSegmentData, ThrowOnError>): RequestResult<GetSegmentResponses, GetSegmentErrors, ThrowOnError> => (options.client ?? client).get<GetSegmentResponses, GetSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments/{id}',\n ...options\n});\n\n/**\n * Update a segment\n */\nexport const updateSegment = <ThrowOnError extends boolean = false>(options: Options<UpdateSegmentData, ThrowOnError>): RequestResult<UpdateSegmentResponses, UpdateSegmentErrors, ThrowOnError> => (options.client ?? client).patch<UpdateSegmentResponses, UpdateSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Get the company profile\n *\n * What the classifier knows about you: name, description, use cases, your own accounts, and the composed context it reads.\n */\nexport const getCompany = <ThrowOnError extends boolean = false>(options?: Options<GetCompanyData, ThrowOnError>): RequestResult<GetCompanyResponses, GetCompanyErrors, ThrowOnError> => (options?.client ?? client).get<GetCompanyResponses, GetCompanyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/company',\n ...options\n});\n\n/**\n * Update the company profile\n *\n * Changing profile fields recomposes the classifier context; setting `context` directly overrides it until the next profile edit. Relevance scores for new mentions follow at once.\n */\nexport const updateCompany = <ThrowOnError extends boolean = false>(options: Options<UpdateCompanyData, ThrowOnError>): RequestResult<UpdateCompanyResponses, UpdateCompanyErrors, ThrowOnError> => (options.client ?? client).patch<UpdateCompanyResponses, UpdateCompanyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/company',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List API keys\n */\nexport const listApiKeys = <ThrowOnError extends boolean = false>(options?: Options<ListApiKeysData, ThrowOnError>): RequestResult<ListApiKeysResponses, ListApiKeysErrors, ThrowOnError> => (options?.client ?? client).get<ListApiKeysResponses, ListApiKeysErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/api-keys',\n ...options\n});\n\n/**\n * Create an API key\n *\n * Mint a key for this workspace. The key itself is returned once; only its hash is stored.\n */\nexport const createApiKey = <ThrowOnError extends boolean = false>(options: Options<CreateApiKeyData, ThrowOnError>): RequestResult<CreateApiKeyResponses, CreateApiKeyErrors, ThrowOnError> => (options.client ?? client).post<CreateApiKeyResponses, CreateApiKeyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/api-keys',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Revoke an API key\n *\n * Takes effect at once on the API and within a few minutes on cached verifications.\n */\nexport const revokeApiKey = <ThrowOnError extends boolean = false>(options: Options<RevokeApiKeyData, ThrowOnError>): RequestResult<RevokeApiKeyResponses, RevokeApiKeyErrors, ThrowOnError> => (options.client ?? client).delete<RevokeApiKeyResponses, RevokeApiKeyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/api-keys/{id}',\n ...options\n});\n\n/**\n * Delete an alert\n */\nexport const deleteAlert = <ThrowOnError extends boolean = false>(options: Options<DeleteAlertData, ThrowOnError>): RequestResult<DeleteAlertResponses, DeleteAlertErrors, ThrowOnError> => (options.client ?? client).delete<DeleteAlertResponses, DeleteAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}',\n ...options\n});\n\n/**\n * Get an alert\n */\nexport const getAlert = <ThrowOnError extends boolean = false>(options: Options<GetAlertData, ThrowOnError>): RequestResult<GetAlertResponses, GetAlertErrors, ThrowOnError> => (options.client ?? client).get<GetAlertResponses, GetAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}',\n ...options\n});\n\n/**\n * Update an alert\n */\nexport const updateAlert = <ThrowOnError extends boolean = false>(options: Options<UpdateAlertData, ThrowOnError>): RequestResult<UpdateAlertResponses, UpdateAlertErrors, ThrowOnError> => (options.client ?? client).patch<UpdateAlertResponses, UpdateAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List alerts\n */\nexport const listAlerts = <ThrowOnError extends boolean = false>(options?: Options<ListAlertsData, ThrowOnError>): RequestResult<ListAlertsResponses, ListAlertsErrors, ThrowOnError> => (options?.client ?? client).get<ListAlertsResponses, ListAlertsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts',\n ...options\n});\n\n/**\n * Create an alert\n */\nexport const createAlert = <ThrowOnError extends boolean = false>(options: Options<CreateAlertData, ThrowOnError>): RequestResult<CreateAlertResponses, CreateAlertErrors, ThrowOnError> => (options.client ?? client).post<CreateAlertResponses, CreateAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Send a test through an alert's channels\n */\nexport const testAlert = <ThrowOnError extends boolean = false>(options: Options<TestAlertData, ThrowOnError>): RequestResult<TestAlertResponses, TestAlertErrors, ThrowOnError> => (options.client ?? client).post<TestAlertResponses, TestAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}/test',\n ...options\n});\n\n/**\n * Send a digest now\n */\nexport const runAlertDigest = <ThrowOnError extends boolean = false>(options: Options<RunAlertDigestData, ThrowOnError>): RequestResult<RunAlertDigestResponses, RunAlertDigestErrors, ThrowOnError> => (options.client ?? client).post<RunAlertDigestResponses, RunAlertDigestErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}/run',\n ...options\n});\n\n/**\n * Headline counts for a window\n *\n * Matched and relevant mentions, distinct posts and people, sentiment, buying intent and questions, estimated reach, and where the matches stand in triage. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getAnalyticsSummary = <ThrowOnError extends boolean = false>(options?: Options<GetAnalyticsSummaryData, ThrowOnError>): RequestResult<GetAnalyticsSummaryResponses, GetAnalyticsSummaryErrors, ThrowOnError> => (options?.client ?? client).get<GetAnalyticsSummaryResponses, GetAnalyticsSummaryErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/summary',\n ...options\n});\n\n/**\n * Mentions over time\n *\n * Matched, relevant and sentiment counts per day or week across the window, as one total series or split per platform or per keyword with `by`. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getAnalyticsSeries = <ThrowOnError extends boolean = false>(options?: Options<GetAnalyticsSeriesData, ThrowOnError>): RequestResult<GetAnalyticsSeriesResponses, GetAnalyticsSeriesErrors, ThrowOnError> => (options?.client ?? client).get<GetAnalyticsSeriesResponses, GetAnalyticsSeriesErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/series',\n ...options\n});\n\n/**\n * Mentions grouped by one dimension\n *\n * One table of matched, relevant and sentiment counts grouped by `by`: platform, keyword, sentiment, intent, status, hour (weekday and hour of day) or person. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getAnalyticsBreakdown = <ThrowOnError extends boolean = false>(options: Options<GetAnalyticsBreakdownData, ThrowOnError>): RequestResult<GetAnalyticsBreakdownResponses, GetAnalyticsBreakdownErrors, ThrowOnError> => (options.client ?? client).get<GetAnalyticsBreakdownResponses, GetAnalyticsBreakdownErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/breakdown',\n ...options\n});\n\n/**\n * Brand against competitors\n *\n * Every keyword matched in the window with its counts and its share of brand plus competitor matches; topic keywords are counted but stay out of the split. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getShareOfVoice = <ThrowOnError extends boolean = false>(options?: Options<GetShareOfVoiceData, ThrowOnError>): RequestResult<GetShareOfVoiceResponses, GetShareOfVoiceErrors, ThrowOnError> => (options?.client ?? client).get<GetShareOfVoiceResponses, GetShareOfVoiceErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/share-of-voice',\n ...options\n});\n\n/**\n * Delete a channel\n */\nexport const deleteChannel = <ThrowOnError extends boolean = false>(options: Options<DeleteChannelData, ThrowOnError>): RequestResult<DeleteChannelResponses, DeleteChannelErrors, ThrowOnError> => (options.client ?? client).delete<DeleteChannelResponses, DeleteChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}',\n ...options\n});\n\n/**\n * Get a channel\n */\nexport const getChannel = <ThrowOnError extends boolean = false>(options: Options<GetChannelData, ThrowOnError>): RequestResult<GetChannelResponses, GetChannelErrors, ThrowOnError> => (options.client ?? client).get<GetChannelResponses, GetChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}',\n ...options\n});\n\n/**\n * Update a channel\n */\nexport const updateChannel = <ThrowOnError extends boolean = false>(options: Options<UpdateChannelData, ThrowOnError>): RequestResult<UpdateChannelResponses, UpdateChannelErrors, ThrowOnError> => (options.client ?? client).patch<UpdateChannelResponses, UpdateChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Send a test to a channel\n */\nexport const testChannel = <ThrowOnError extends boolean = false>(options: Options<TestChannelData, ThrowOnError>): RequestResult<TestChannelResponses, TestChannelErrors, ThrowOnError> => (options.client ?? client).post<TestChannelResponses, TestChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}/test',\n ...options\n});\n\n/**\n * Rotate a webhook secret\n */\nexport const rotateWebhookSecret = <ThrowOnError extends boolean = false>(options: Options<RotateWebhookSecretData, ThrowOnError>): RequestResult<RotateWebhookSecretResponses, RotateWebhookSecretErrors, ThrowOnError> => (options.client ?? client).post<RotateWebhookSecretResponses, RotateWebhookSecretErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}/rotate-secret',\n ...options\n});\n\n/**\n * List deliveries to a channel\n */\nexport const listChannelDeliveries = <ThrowOnError extends boolean = false>(options: Options<ListChannelDeliveriesData, ThrowOnError>): RequestResult<ListChannelDeliveriesResponses, ListChannelDeliveriesErrors, ThrowOnError> => (options.client ?? client).get<ListChannelDeliveriesResponses, ListChannelDeliveriesErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}/deliveries',\n ...options\n});\n\n/**\n * List channels\n */\nexport const listChannels = <ThrowOnError extends boolean = false>(options?: Options<ListChannelsData, ThrowOnError>): RequestResult<ListChannelsResponses, ListChannelsErrors, ThrowOnError> => (options?.client ?? client).get<ListChannelsResponses, ListChannelsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels',\n ...options\n});\n\n/**\n * Create a channel\n */\nexport const createChannel = <ThrowOnError extends boolean = false>(options: Options<CreateChannelData, ThrowOnError>): RequestResult<CreateChannelResponses, CreateChannelErrors, ThrowOnError> => (options.client ?? client).post<CreateChannelResponses, CreateChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, type ClientOptions, type Config, createClient, createConfig } from './client';\nimport type { ClientOptions as ClientOptions2 } from './types.gen';\n\n/**\n * The `createClientConfig()` function will be called on client initialization\n * and the returned object will become the client's initial configuration.\n *\n * You may want to initialize your client this way instead of calling\n * `setConfig()`. This is useful for example if you're using Next.js\n * to ensure your client always has the correct values.\n */\nexport type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;\n\nexport const client: Client = createClient(createConfig<ClientOptions2>({ baseUrl: 'https://api.mentio.dev' }));\n","/**\n * @mentio-dev/sdk: a typed client for the Mentio API. Everything under\n * ./generated comes from the API's OpenAPI document (`pnpm generate`), one\n * function per operation; this file adds the constructor that binds a key\n * and a host once so calls read `mentio.searchMentions({ query })`.\n */\nimport { createClient, createConfig, type Client } from './generated/client';\nimport * as sdk from './generated/sdk.gen';\n\nexport * from './generated';\nexport { createClient, createConfig } from './generated/client';\nexport type { Client, Config, RequestResult } from './generated/client';\n\nexport const DEFAULT_BASE_URL = 'https://api.mentio.dev';\n\nexport interface MentioOptions {\n /** API key from the dashboard or POST /v1/api-keys (mk_live_...). */\n apiKey: string;\n /** Another deployment's host; the hosted API by default. */\n baseUrl?: string;\n /** Custom fetch, for tests or runtimes without a global one. */\n fetch?: typeof fetch;\n /** Extra headers sent on every request. */\n headers?: Record<string, string>;\n}\n\n/** Every SDK function, pre-bound to one client, plus the client itself for\n * interceptors and raw requests. Passing `client` in a call still wins. */\nexport type Mentio = typeof sdk & { client: Client };\n\nexport function createMentio(options: MentioOptions): Mentio {\n const client = createClient(\n createConfig({\n baseUrl: (options.baseUrl ?? DEFAULT_BASE_URL).replace(/\\/+$/, ''),\n auth: () => options.apiKey,\n ...(options.fetch ? { fetch: options.fetch } : {}),\n ...(options.headers ? { headers: options.headers } : {}),\n }),\n );\n const bound: Record<string, unknown> = {};\n for (const [name, fn] of Object.entries(sdk)) {\n if (typeof fn !== 'function') continue;\n const call = fn as (callOptions?: { client?: Client }) => unknown;\n bound[name] = (callOptions?: { client?: Client }) => call({ ...callOptions, client: callOptions?.client ?? client });\n }\n return { ...(bound as typeof sdk), client };\n}\n","/**\n * One generic request runner for every generated command: the operation\n * table says method, path and response kind; flags.ts already turned the\n * command line into path, query and body. No per-endpoint code.\n */\nimport { createMentio, type Client } from '@mentio-dev/sdk';\nimport type { BuiltRequest } from './flags';\nimport type { CliOperation } from './operations-types';\nimport type { Settings } from './config';\n\nexport interface RunOutcome {\n ok: boolean;\n status: number;\n /** The parsed body: JSON, CSV text, or undefined for 204. */\n value: unknown;\n}\n\nexport function clientFor(settings: Settings, fetchImpl?: typeof fetch): Client {\n return createMentio({ apiKey: settings.apiKey ?? '', baseUrl: settings.apiUrl, ...(fetchImpl ? { fetch: fetchImpl } : {}) }).client;\n}\n\ntype Method = 'GET' | 'POST' | 'PATCH' | 'DELETE' | 'PUT';\n\n/** The generated SDK functions carry this per call; raw client.request calls must too, or the key is never sent. */\nexport const BEARER = [{ scheme: 'bearer', type: 'http' }] as const;\n\nexport async function runOperation(client: Client, op: CliOperation, request: BuiltRequest): Promise<RunOutcome> {\n const result = await client.request({\n method: op.method as Method,\n url: op.path,\n path: request.path,\n query: request.query,\n ...(request.body !== undefined ? { body: request.body } : {}),\n parseAs: op.response === 'csv' ? 'text' : 'auto',\n security: BEARER,\n throwOnError: false,\n });\n const status = result.response?.status ?? 0;\n if (result.error !== undefined) return { ok: false, status, value: result.error };\n if (!result.response) return { ok: false, status, value: undefined };\n // A 204 parses to null; the CLI prints its own { ok, status } for those.\n return { ok: result.response.ok, status, value: result.data ?? undefined };\n}\n\n/** The API's error envelope when there is one, else something shaped like it. */\nexport function errorEnvelope(outcome: RunOutcome): { error: { code: string; message: string } } {\n const value = outcome.value;\n if (value !== null && typeof value === 'object' && 'error' in value) {\n const inner = (value as { error: unknown }).error;\n if (inner !== null && typeof inner === 'object' && 'code' in inner && 'message' in inner) {\n return value as { error: { code: string; message: string } };\n }\n }\n const message = typeof value === 'string' && value.trim() !== '' ? value.trim().slice(0, 300) : `Request failed with status ${outcome.status}`;\n return { error: { code: `http_${outcome.status}`, message } };\n}\n","/**\n * mentions:watch: `tail -f` for the feed. Polls the newest page on an\n * interval and prints every mention it has not printed before as one JSON\n * line, oldest first, so a shell pipeline is an alert channel. Dedup is by\n * mention id over a bounded window; the API's `since` filters by publish\n * date, which lags ingest, so it is not used for this.\n */\nimport type { Client } from '@mentio-dev/sdk';\nimport { BEARER } from './run';\n\nconst SEEN_LIMIT = 5000;\nconst PAGE = 100;\n\nexport interface Seen {\n ids: Set<string>;\n order: string[];\n}\n\nexport const newSeen = (): Seen => ({ ids: new Set(), order: [] });\n\n/** Items not seen yet, oldest first; marks them seen. */\nexport function takeNew<T extends { id: string }>(seen: Seen, newestFirst: ReadonlyArray<T>): T[] {\n const fresh: T[] = [];\n for (const item of newestFirst) {\n if (seen.ids.has(item.id)) continue;\n fresh.push(item);\n }\n for (const item of fresh) {\n seen.ids.add(item.id);\n seen.order.push(item.id);\n }\n while (seen.order.length > SEEN_LIMIT) {\n const oldest = seen.order.shift();\n if (oldest !== undefined) seen.ids.delete(oldest);\n }\n return fresh.reverse();\n}\n\nexport interface WatchOptions {\n client: Client;\n /** Search filters, already coerced (platform, keywordId, relevant, ...). */\n query: Record<string, string | number | boolean>;\n intervalMs: number;\n /** Print the current first page before following; off by default, like tail -f. */\n fromStart: boolean;\n write: (line: string) => void;\n warn: (line: string) => void;\n signal: AbortSignal;\n sleep?: (ms: number, signal: AbortSignal) => Promise<void>;\n}\n\nconst defaultSleep = (ms: number, signal: AbortSignal): Promise<void> =>\n new Promise((resolve) => {\n if (signal.aborted) return resolve();\n const timer = setTimeout(resolve, ms);\n signal.addEventListener('abort', () => {\n clearTimeout(timer);\n resolve();\n });\n });\n\nexport async function watchMentions(options: WatchOptions): Promise<void> {\n const sleep = options.sleep ?? defaultSleep;\n const seen = newSeen();\n let first = true;\n while (!options.signal.aborted) {\n const result = await options.client.request({\n method: 'GET',\n url: '/v1/mentions',\n query: { ...options.query, sort: 'newest', limit: PAGE },\n security: BEARER,\n throwOnError: false,\n });\n if (result.error !== undefined || !result.response?.ok) {\n options.warn(JSON.stringify({ error: result.error ?? { code: `http_${result.response?.status ?? 0}`, message: 'poll failed' } }));\n } else {\n const page = (result.data as { data?: Array<{ id: string }> } | undefined)?.data ?? [];\n const fresh = takeNew(seen, page);\n if (!first || options.fromStart) for (const item of fresh) options.write(JSON.stringify(item));\n }\n first = false;\n await sleep(options.intervalMs, options.signal);\n }\n}\n"],"mappings":";;;;;;;;AAOA,SAAS,SAAS,cAAc;AAChC,SAAS,iBAAAA,sBAAqB;;;ACR9B;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,SAAW;AAAA,EACX,UAAY;AAAA,EACZ,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EACA,MAAQ;AAAA,IACN,KAAO;AAAA,EACT;AAAA,EAC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nE,OAAO,WAAW,yBAAyB,EAC3C,mBAAmB,6BAA6B,EAChD,cAAc,EAAE,iBAAiB,KAAK,CAAC;AAE1C,aAAa;AACb,WAAW,MAAM,WAAY,mBAAkB,EAAE;AACjD,cAAc;AACd,YAAY;AAEZ,QAAQ,WAAW,QAAQ,IAAI,EAAE,MAAM,CAAC,QAAiB;AACvD,OAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,SAAS,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,EAAE,EAAE,CAAC;AACvG,CAAC;","names":["writeFileSync","joinedValues","config","request","url","client","client","writeFileSync"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../package.json","../src/config.ts","../src/flags.ts","../src/login.ts","../src/mcp.ts","../src/naming.ts","../src/generated/operations.ts","../src/output.ts","../../sdk/src/generated/core/bodySerializer.gen.ts","../../sdk/src/generated/core/params.gen.ts","../../sdk/src/generated/core/serverSentEvents.gen.ts","../../sdk/src/generated/core/pathSerializer.gen.ts","../../sdk/src/generated/core/utils.gen.ts","../../sdk/src/generated/core/auth.gen.ts","../../sdk/src/generated/client/utils.gen.ts","../../sdk/src/generated/client/client.gen.ts","../../sdk/src/generated/sdk.gen.ts","../../sdk/src/generated/client.gen.ts","../../sdk/src/index.ts","../src/run.ts","../src/watch.ts"],"sourcesContent":["/**\n * mentio: the command line for the Mentio API. Every public endpoint is a\n * `noun:verb` command generated from the OpenAPI document at build time\n * (./generated/operations.ts), so the CLI cannot drift from the API. Three\n * commands are hand-written because they are more than one request:\n * auth:*, mentions:watch and mcp:config.\n */\nimport { Command, Option } from 'commander';\nimport { writeFileSync } from 'node:fs';\nimport { hostname } from 'node:os';\nimport pkg from '../package.json' with { type: 'json' };\nimport { keyPrefix, resolveSettings, writeConfig, type Settings } from './config';\nimport { buildRequest, coerce, flagHelp, UsageError } from './flags';\nimport { DEFAULT_APP_URL, LoginError, loginUrl, newState, openBrowser, startCallbackServer } from './login';\nimport { DEFAULT_MCP_URL, mcpConfig, type McpClientKind } from './mcp';\nimport { commandName } from './naming';\nimport { OPERATIONS } from './generated/operations';\nimport type { CliField, CliOperation } from './operations-types';\nimport { formatOutput } from './output';\nimport { BEARER, clientFor, errorEnvelope, runOperation } from './run';\nimport { watchMentions } from './watch';\n\nconst program = new Command();\n\ninterface GlobalFlags {\n apiKey?: string;\n apiUrl?: string;\n pretty?: boolean;\n table?: boolean;\n}\n\nconst stdoutIsTty = (): boolean => Boolean(process.stdout.isTTY);\n\nfunction print(value: unknown, globals: GlobalFlags): void {\n process.stdout.write(`${formatOutput(value, { pretty: globals.pretty ?? stdoutIsTty(), table: globals.table ?? false })}\\n`);\n}\n\nfunction fail(envelope: { error: { code: string; message: string } }, code = 1): never {\n process.stderr.write(`${JSON.stringify(envelope)}\\n`);\n process.exit(code);\n}\n\nfunction settingsOrFail(globals: GlobalFlags, needsKey: boolean): Settings {\n const settings = resolveSettings({ apiKey: globals.apiKey, apiUrl: globals.apiUrl });\n if (needsKey && !settings.apiKey) {\n fail({ error: { code: 'no_api_key', message: 'No API key. Run `mentio auth:set --key mk_live_...`, set MENTIO_API_KEY, or pass --api-key.' } }, 2);\n }\n return settings;\n}\n\nfunction addFieldOption(command: Command, field: CliField): void {\n const option = new Option(`--${field.name} <value>`, flagHelp(field));\n if (field.enum && field.type !== 'array') option.choices(field.nullable ? [...field.enum, 'null'] : field.enum);\n command.addOption(option);\n}\n\nfunction registerOperation(op: CliOperation): void {\n const name = commandName(op);\n const command = program.command(name).description(op.summary).summary(op.summary);\n if (op.description) command.addHelpText('after', `\\n${op.description}\\n`);\n for (const param of op.params.filter((p) => p.in === 'path')) command.argument(`<${param.name}>`, param.description ?? '');\n for (const param of op.params.filter((p) => p.in === 'query')) addFieldOption(command, param);\n if (op.body) {\n for (const field of op.body.fields) addFieldOption(command, field);\n command.option('--json <object>', 'The whole body as JSON; flags override its fields. \"-\" reads stdin.');\n }\n if (op.response === 'csv') command.option('--out <file>', 'Write the CSV to a file instead of stdout.');\n command.action(async (...args: unknown[]) => {\n const cmd = args[args.length - 1] as Command;\n const positional = args.slice(0, -2) as string[];\n const flags = cmd.opts<Record<string, unknown>>();\n const globals = program.opts<GlobalFlags>();\n try {\n let jsonBody = typeof flags.json === 'string' ? flags.json : undefined;\n if (jsonBody === '-') jsonBody = await readStdin();\n const request = buildRequest(op, positional, flags, jsonBody);\n const settings = settingsOrFail(globals, op.operationId !== 'getHealth');\n const outcome = await runOperation(clientFor(settings), op, request);\n if (!outcome.ok) fail(errorEnvelope(outcome));\n if (op.response === 'csv') {\n const csv = typeof outcome.value === 'string' ? outcome.value : '';\n if (typeof flags.out === 'string') {\n writeFileSync(flags.out, csv);\n print({ ok: true, file: flags.out, bytes: Buffer.byteLength(csv) }, globals);\n } else {\n process.stdout.write(csv);\n }\n return;\n }\n print(outcome.value === undefined ? { ok: true, status: outcome.status } : outcome.value, globals);\n } catch (err) {\n if (err instanceof UsageError) fail({ error: { code: 'usage', message: err.message } }, 2);\n throw err;\n }\n });\n}\n\nasync function readStdin(): Promise<string> {\n const chunks: Buffer[] = [];\n for await (const chunk of process.stdin) chunks.push(typeof chunk === 'string' ? Buffer.from(chunk) : chunk);\n return Buffer.concat(chunks).toString('utf8');\n}\n\nfunction registerAuth(): void {\n program\n .command('auth:login')\n .description('Sign in through the browser: the dashboard mints an API key and hands it to this terminal')\n .option('--app-url <url>', 'Dashboard URL', DEFAULT_APP_URL)\n .option('--name <label>', 'Name of the key the dashboard creates', `CLI on ${hostname()}`)\n .addOption(new Option('--scope <scope>', 'read: GET only. write: everything.').choices(['read', 'write']).default('write'))\n .option('--timeout <seconds>', 'How long to wait for the browser', '300')\n .option('--no-open', 'Print the URL instead of opening the browser')\n .action(async (flags: { appUrl: string; name: string; scope: 'read' | 'write'; timeout: string; open: boolean }) => {\n const globals = program.opts<GlobalFlags>();\n const seconds = Number(flags.timeout);\n if (!Number.isFinite(seconds) || seconds < 10) fail({ error: { code: 'usage', message: '--timeout must be at least 10 seconds' } }, 2);\n const state = newState();\n const server = await startCallbackServer(state, seconds * 1000);\n const url = loginUrl(flags.appUrl, { port: server.port, state, name: flags.name, scope: flags.scope });\n const opened = flags.open ? openBrowser(url) : false;\n process.stderr.write(`${opened ? 'Opening your browser to authorize the CLI. If it does not open, visit:' : 'Open this URL to authorize the CLI:'}\\n ${url}\\nWaiting for the browser (${seconds}s)...\\n`);\n let key: string;\n try {\n key = await server.key;\n } catch (err) {\n fail({ error: { code: 'login_failed', message: err instanceof LoginError ? err.message : String(err) } });\n }\n const path = writeConfig({ apiKey: key, ...(globals.apiUrl ? { apiUrl: globals.apiUrl } : {}) });\n const settings = resolveSettings({ apiKey: key, apiUrl: globals.apiUrl });\n const result = await clientFor(settings).request({ method: 'GET', url: '/v1/company', security: BEARER, throwOnError: false });\n const company = result.error === undefined && result.response?.ok ? (result.data as { name?: string } | undefined) : undefined;\n print({ ok: true, workspace: company?.name ?? null, key: keyPrefix(key), scope: flags.scope, file: path }, globals);\n });\n program\n .command('auth:set')\n .description('Store an API key (and optionally the API host) in ~/.mentio/config.json')\n .requiredOption('--key <key>', 'API key from the dashboard or POST /v1/api-keys (mk_live_...)')\n .option('--url <url>', 'API host for a self-hosted deployment')\n .action((flags: { key: string; url?: string }) => {\n const path = writeConfig({ apiKey: flags.key, ...(flags.url ? { apiUrl: flags.url } : {}) });\n print({ ok: true, file: path, key: keyPrefix(flags.key) }, program.opts<GlobalFlags>());\n });\n program\n .command('auth:logout')\n .description('Remove the stored API key')\n .action(() => {\n const path = writeConfig({ apiKey: null });\n print({ ok: true, file: path }, program.opts<GlobalFlags>());\n });\n program\n .command('auth:check')\n .description('Verify the key: which workspace it belongs to and where it came from')\n .action(async () => {\n const globals = program.opts<GlobalFlags>();\n const settings = settingsOrFail(globals, true);\n const result = await clientFor(settings).request({ method: 'GET', url: '/v1/company', security: BEARER, throwOnError: false });\n if (result.error !== undefined || !result.response?.ok) {\n fail(errorEnvelope({ ok: false, status: result.response?.status ?? 0, value: result.error }));\n }\n const company = result.data as { name?: string } | undefined;\n print({ ok: true, workspace: company?.name ?? null, key: keyPrefix(settings.apiKey ?? ''), source: settings.source, apiUrl: settings.apiUrl }, globals);\n });\n}\n\nfunction registerWatch(): void {\n const search = OPERATIONS.find((op) => op.operationId === 'searchMentions');\n if (!search) return;\n const command = program\n .command('mentions:watch')\n .description('Follow the feed: print each new mention as one JSON line (tail -f for mentions)')\n .option('--interval <seconds>', 'Seconds between polls', '30')\n .option('--from-start', 'Print the current newest page first instead of only what arrives next');\n const skip = new Set(['cursor', 'limit', 'sort', 'since', 'until']);\n const filters = search.params.filter((p) => p.in === 'query' && !skip.has(p.name));\n for (const param of filters) addFieldOption(command, param);\n command.action(async (flags: Record<string, unknown>) => {\n const globals = program.opts<GlobalFlags>();\n const settings = settingsOrFail(globals, true);\n const query: Record<string, string | number | boolean> = {};\n try {\n for (const param of filters) {\n const raw = flags[param.name];\n if (raw === undefined) continue;\n const value = coerce(param, String(raw));\n if (value !== null && typeof value !== 'object') query[param.name] = value;\n }\n } catch (err) {\n if (err instanceof UsageError) fail({ error: { code: 'usage', message: err.message } }, 2);\n throw err;\n }\n const seconds = Number(flags.interval);\n if (!Number.isFinite(seconds) || seconds < 5) fail({ error: { code: 'usage', message: '--interval must be at least 5 seconds' } }, 2);\n const controller = new AbortController();\n process.on('SIGINT', () => controller.abort());\n process.on('SIGTERM', () => controller.abort());\n await watchMentions({\n client: clientFor(settings),\n query,\n intervalMs: seconds * 1000,\n fromStart: flags.fromStart === true,\n write: (line) => process.stdout.write(`${line}\\n`),\n warn: (line) => process.stderr.write(`${line}\\n`),\n signal: controller.signal,\n });\n });\n}\n\nfunction registerMcp(): void {\n program\n .command('mcp:config')\n .description('Print the MCP client configuration for the Mentio MCP server, key included')\n .addOption(new Option('--client <kind>', 'Which client to print for').choices(['claude', 'cursor', 'vscode', 'generic']).default('claude'))\n .option('--url <url>', 'MCP server URL', DEFAULT_MCP_URL)\n .action((flags: { client: McpClientKind; url: string }) => {\n const globals = program.opts<GlobalFlags>();\n const settings = resolveSettings({ apiKey: globals.apiKey, apiUrl: globals.apiUrl });\n const key = settings.apiKey ?? 'mk_live_...';\n if (!settings.apiKey) process.stderr.write('No API key configured; printing a placeholder. Run `mentio auth:set --key ...` first.\\n');\n process.stdout.write(`${mcpConfig(flags.client, flags.url, key)}\\n`);\n });\n}\n\nprogram\n .name('mentio')\n .description('Command line for the Mentio API. Commands are noun:verb; every endpoint has one.')\n .version(pkg.version, '-V, --version')\n .option('--api-key <key>', 'API key (overrides MENTIO_API_KEY and the stored key)')\n .option('--api-url <url>', 'API host (overrides MENTIO_API_URL and the stored host)')\n .option('--pretty', 'Indent JSON output (the default on a terminal)')\n .option('--table', 'Render lists as a table')\n .showHelpAfterError('(run with --help for usage)')\n .configureHelp({ sortSubcommands: true });\n\nregisterAuth();\nfor (const op of OPERATIONS) registerOperation(op);\nregisterWatch();\nregisterMcp();\n\nprogram.parseAsync(process.argv).catch((err: unknown) => {\n fail({ error: { code: 'internal_error', message: err instanceof Error ? err.message : String(err) } });\n});\n","{\n \"name\": \"@mentio-dev/cli\",\n \"version\": \"0.2.0\",\n \"description\": \"Command-line client for the Mentio API: one command per endpoint, plus watch and MCP helpers.\",\n \"license\": \"MIT\",\n \"homepage\": \"https://docs.mentio.dev/cli\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/PauGuirao/mentions.git\",\n \"directory\": \"packages/cli\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/PauGuirao/mentions/issues\"\n },\n \"keywords\": [\n \"mentio\",\n \"social listening\",\n \"brand monitoring\",\n \"cli\",\n \"mcp\"\n ],\n \"type\": \"module\",\n \"bin\": {\n \"mentio\": \"./dist/index.js\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"files\": [\n \"dist\",\n \"README.md\"\n ],\n \"engines\": {\n \"node\": \">=22\"\n },\n \"scripts\": {\n \"generate\": \"tsx scripts/generate-operations.ts\",\n \"build\": \"tsup\",\n \"dev\": \"tsx src/index.ts\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run\",\n \"prepublishOnly\": \"pnpm build\"\n },\n \"dependencies\": {\n \"commander\": \"^15.0.0\"\n },\n \"devDependencies\": {\n \"@mentio-dev/sdk\": \"workspace:*\",\n \"@types/node\": \"^22.15.0\",\n \"tsup\": \"^8.5.1\",\n \"tsx\": \"^4.23.1\",\n \"typescript\": \"^5.7.0\",\n \"vitest\": \"^3.0.0\"\n }\n}\n","/**\n * Where the CLI finds its key and its API host. Precedence: flags, then\n * MENTIO_API_KEY / MENTIO_API_URL, then ~/.mentio/config.json written by\n * `mentio auth:set`. MENTIO_CONFIG_DIR relocates the file (CI, tests).\n */\nimport { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\n\nexport const DEFAULT_API_URL = 'https://api.mentio.dev';\n\nexport interface StoredConfig {\n apiKey?: string;\n apiUrl?: string;\n}\n\nexport interface Settings {\n apiKey: string | undefined;\n apiUrl: string;\n /** Where the key came from, for `auth:check`. */\n source: 'flag' | 'env' | 'file' | 'none';\n}\n\nexport function configDir(env: NodeJS.ProcessEnv = process.env): string {\n return env.MENTIO_CONFIG_DIR ?? join(homedir(), '.mentio');\n}\n\nexport function configPath(env: NodeJS.ProcessEnv = process.env): string {\n return join(configDir(env), 'config.json');\n}\n\nexport function readConfig(env: NodeJS.ProcessEnv = process.env): StoredConfig {\n const path = configPath(env);\n if (!existsSync(path)) return {};\n try {\n const parsed: unknown = JSON.parse(readFileSync(path, 'utf8'));\n if (parsed === null || typeof parsed !== 'object') return {};\n const record = parsed as Record<string, unknown>;\n return {\n apiKey: typeof record.apiKey === 'string' ? record.apiKey : undefined,\n apiUrl: typeof record.apiUrl === 'string' ? record.apiUrl : undefined,\n };\n } catch {\n return {};\n }\n}\n\n/** Merges into the file; `undefined` leaves a field alone, `null` removes it. */\nexport function writeConfig(patch: { apiKey?: string | null; apiUrl?: string | null }, env: NodeJS.ProcessEnv = process.env): string {\n const current = readConfig(env);\n const next: StoredConfig = { ...current };\n if (patch.apiKey === null) delete next.apiKey;\n else if (patch.apiKey !== undefined) next.apiKey = patch.apiKey;\n if (patch.apiUrl === null) delete next.apiUrl;\n else if (patch.apiUrl !== undefined) next.apiUrl = patch.apiUrl;\n const dir = configDir(env);\n mkdirSync(dir, { recursive: true, mode: 0o700 });\n const path = configPath(env);\n writeFileSync(path, `${JSON.stringify(next, null, 2)}\\n`, { mode: 0o600 });\n // writeFileSync only applies the mode on creation; an existing file keeps its bits.\n chmodSync(path, 0o600);\n return path;\n}\n\nexport function resolveSettings(\n flags: { apiKey?: string; apiUrl?: string },\n env: NodeJS.ProcessEnv = process.env,\n): Settings {\n const file = readConfig(env);\n const apiUrl = (flags.apiUrl ?? env.MENTIO_API_URL ?? file.apiUrl ?? DEFAULT_API_URL).replace(/\\/+$/, '');\n if (flags.apiKey) return { apiKey: flags.apiKey, apiUrl, source: 'flag' };\n if (env.MENTIO_API_KEY) return { apiKey: env.MENTIO_API_KEY, apiUrl, source: 'env' };\n if (file.apiKey) return { apiKey: file.apiKey, apiUrl, source: 'file' };\n return { apiKey: undefined, apiUrl, source: 'none' };\n}\n\n/** mk_live_abcd... -> mk_live_abcd, enough to tell keys apart in output. */\nexport function keyPrefix(key: string): string {\n const match = /^([a-z]+_[a-z]+_[a-z0-9]{4})/i.exec(key);\n return match?.[1] ?? key.slice(0, 12);\n}\n","/**\n * Command-line values to API values. Every flag takes a value (`--muted\n * false`, never a bare `--muted`), so a PATCH can set a boolean either way,\n * and a nullable body field accepts the literal `null` to clear it, as the\n * API does. Lists are comma-separated; objects are JSON.\n */\nimport type { CliField, CliOperation } from './operations-types';\n\nexport class UsageError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UsageError';\n }\n}\n\nexport type ApiValue = string | number | boolean | null | ApiValue[] | { [key: string]: ApiValue };\n\nfunction coerceScalar(field: CliField, raw: string, type: CliField['type']): ApiValue {\n switch (type) {\n case 'integer':\n case 'number': {\n const n = Number(raw);\n // Instants (since, until, snoozedUntil) are epoch milliseconds in the\n // spec but the API takes ISO 8601 too; let a date through as written.\n if (!Number.isFinite(n) && /^\\d{4}-\\d{2}-\\d{2}/.test(raw) && Number.isFinite(Date.parse(raw))) return raw;\n if (raw.trim() === '' || !Number.isFinite(n)) throw new UsageError(`--${field.name} expects a number, got \"${raw}\"`);\n if (type === 'integer' && !Number.isInteger(n)) throw new UsageError(`--${field.name} expects a whole number, got \"${raw}\"`);\n return n;\n }\n case 'boolean':\n if (raw === 'true') return true;\n if (raw === 'false') return false;\n throw new UsageError(`--${field.name} expects true or false, got \"${raw}\"`);\n case 'object': {\n try {\n const parsed: unknown = JSON.parse(raw);\n if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) throw new Error('not an object');\n return parsed as ApiValue;\n } catch {\n throw new UsageError(`--${field.name} expects a JSON object, got \"${raw}\"`);\n }\n }\n case 'array':\n case 'string':\n default:\n return raw;\n }\n}\n\n/** One flag value as the API wants it. Query lists stay comma-separated\n * strings (the API splits them); body lists become arrays. */\nexport function coerce(field: CliField, raw: string): ApiValue {\n if (field.nullable && raw === 'null') return null;\n if (field.type === 'array') {\n if (field.in === 'query') return raw;\n const trimmed = raw.trim();\n if (trimmed.startsWith('[')) {\n try {\n return JSON.parse(trimmed) as ApiValue;\n } catch {\n throw new UsageError(`--${field.name} expects a comma-separated list or a JSON array`);\n }\n }\n const items = trimmed === '' ? [] : trimmed.split(',').map((v) => v.trim());\n return items.map((item) => coerceScalar(field, item, field.items ?? 'string'));\n }\n return coerceScalar(field, raw, field.type);\n}\n\n/** The text after the flag in --help. */\nexport function flagHelp(field: CliField): string {\n const parts: string[] = [];\n if (field.description) parts.push(field.description.replace(/\\s+/g, ' ').trim());\n // Scalar enums become commander choices, which --help prints on its own.\n const hints: string[] = [];\n if (field.type === 'array') hints.push(field.enum ? `comma-separated: ${field.enum.join('|')}` : 'comma-separated');\n else if (field.type === 'object') hints.push('JSON');\n else if (field.type !== 'string' && !field.enum) hints.push(field.type);\n if (field.nullable) hints.push('null clears');\n if (hints.length > 0) parts.push(`(${hints.join(', ')})`);\n return parts.join(' ');\n}\n\nexport interface BuiltRequest {\n path: Record<string, string>;\n query: Record<string, string | number | boolean>;\n body: Record<string, ApiValue> | undefined;\n}\n\n/** Positional arguments, flags and an optional --json body into the three\n * parts of a request. --json is the base; flags override its fields. */\nexport function buildRequest(op: CliOperation, positional: string[], flags: Record<string, unknown>, jsonBody: string | undefined): BuiltRequest {\n const path: Record<string, string> = {};\n const pathParams = op.params.filter((p) => p.in === 'path');\n pathParams.forEach((param, index) => {\n const value = positional[index];\n if (value === undefined || value === '') throw new UsageError(`missing <${param.name}>`);\n path[param.name] = value;\n });\n\n const query: Record<string, string | number | boolean> = {};\n for (const param of op.params.filter((p) => p.in === 'query')) {\n const raw = flags[param.name];\n if (raw === undefined) continue;\n const value = coerce(param, String(raw));\n if (value === null || typeof value === 'object') continue;\n query[param.name] = value;\n }\n\n let body: Record<string, ApiValue> | undefined;\n if (op.body) {\n body = {};\n if (jsonBody !== undefined) {\n let parsed: unknown;\n try {\n parsed = JSON.parse(jsonBody);\n } catch {\n throw new UsageError('--json is not valid JSON');\n }\n if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) throw new UsageError('--json must be a JSON object');\n body = parsed as Record<string, ApiValue>;\n }\n for (const field of op.body.fields) {\n const raw = flags[field.name];\n if (raw === undefined) continue;\n body[field.name] = coerce(field, String(raw));\n }\n for (const field of op.body.fields) {\n if (field.required && body[field.name] === undefined) throw new UsageError(`--${field.name} is required`);\n }\n }\n return { path, query, body };\n}\n","/**\n * auth:login: the browser flow. The CLI listens on a random loopback port,\n * opens the dashboard's /cli/authorize page with that port and a one-time\n * state, the signed-in user approves, the dashboard mints an API key through\n * POST /v1/api-keys and redirects the browser to\n * http://127.0.0.1:<port>/callback?state=...&key=... The key travels from the\n * browser to this process only; nothing else ever sees it.\n */\nimport { randomBytes } from 'node:crypto';\nimport { spawn } from 'node:child_process';\nimport { createServer } from 'node:http';\n\nexport const DEFAULT_APP_URL = 'https://app.mentio.dev';\n\nexport class LoginError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'LoginError';\n }\n}\n\nexport const newState = (): string => randomBytes(24).toString('base64url');\n\nexport function loginUrl(appUrl: string, params: { port: number; state: string; name: string; scope: 'read' | 'write' }): string {\n const url = new URL('/cli/authorize', `${appUrl.replace(/\\/+$/, '')}/`);\n url.searchParams.set('port', String(params.port));\n url.searchParams.set('state', params.state);\n url.searchParams.set('name', params.name);\n url.searchParams.set('scope', params.scope);\n return url.toString();\n}\n\nexport interface CallbackServer {\n port: number;\n /** Resolves with the key once the dashboard calls back; rejects on denial or timeout. */\n key: Promise<string>;\n close: () => void;\n}\n\nconst page = (title: string, body: string): string =>\n `<!doctype html><meta charset=\"utf-8\"><title>${title}</title><body style=\"font:16px system-ui;padding:3rem;max-width:36rem;margin:auto\"><h1 style=\"font-size:1.25rem\">${title}</h1><p>${body}</p></body>`;\n\n/** Listens on 127.0.0.1 (never 0.0.0.0) on a free port for one callback. */\nexport function startCallbackServer(state: string, timeoutMs: number): Promise<CallbackServer> {\n return new Promise((resolveServer, rejectServer) => {\n let settle: { resolve: (key: string) => void; reject: (err: Error) => void } | null = null;\n const key = new Promise<string>((resolve, reject) => {\n settle = { resolve, reject };\n });\n const server = createServer((req, res) => {\n const url = new URL(req.url ?? '/', 'http://127.0.0.1');\n if (url.pathname !== '/callback') {\n res.writeHead(404, { 'content-type': 'text/html; charset=utf-8' }).end(page('Not found', 'Nothing here.'));\n return;\n }\n const error = url.searchParams.get('error');\n if (error) {\n res.writeHead(200, { 'content-type': 'text/html; charset=utf-8' }).end(page('Cancelled', 'The CLI was not authorized. You can close this tab.'));\n finish(() => settle?.reject(new LoginError(error === 'denied' ? 'Authorization was declined in the browser.' : `Authorization failed: ${error}`)));\n return;\n }\n if (url.searchParams.get('state') !== state) {\n res.writeHead(400, { 'content-type': 'text/html; charset=utf-8' }).end(page('State mismatch', 'This callback does not belong to the running login. Run mentio auth:login again.'));\n return;\n }\n const issued = url.searchParams.get('key');\n if (!issued) {\n res.writeHead(400, { 'content-type': 'text/html; charset=utf-8' }).end(page('Missing key', 'The callback carried no key. Run mentio auth:login again.'));\n return;\n }\n res.writeHead(200, { 'content-type': 'text/html; charset=utf-8' }).end(page('Mentio CLI connected', 'The key is stored on this computer. You can close this tab and go back to the terminal.'));\n finish(() => settle?.resolve(issued));\n });\n const timer = setTimeout(() => finish(() => settle?.reject(new LoginError(`No authorization arrived within ${Math.round(timeoutMs / 1000)} seconds.`))), timeoutMs);\n const close = (): void => {\n clearTimeout(timer);\n server.close();\n };\n const finish = (outcome: () => void): void => {\n // Let the response flush before the listener goes away.\n setTimeout(() => {\n outcome();\n close();\n }, 50);\n };\n server.on('error', (err) => rejectServer(err));\n server.listen(0, '127.0.0.1', () => {\n const address = server.address();\n if (!address || typeof address === 'string') {\n rejectServer(new LoginError('Could not open a loopback port.'));\n return;\n }\n // A rejected key promise nobody awaits yet must not crash the process.\n key.catch(() => {});\n resolveServer({ port: address.port, key, close });\n });\n });\n}\n\n/** Best effort: the URL is always printed too. */\nexport function openBrowser(url: string): boolean {\n try {\n const [command, args] =\n process.platform === 'darwin'\n ? ['open', [url]]\n : process.platform === 'win32'\n ? ['cmd', ['/c', 'start', '', url]]\n : ['xdg-open', [url]];\n const child = spawn(command, args, { detached: true, stdio: 'ignore' });\n child.on('error', () => {});\n child.unref();\n return true;\n } catch {\n return false;\n }\n}\n","/** mcp:config: the snippet that connects an MCP client to the Mentio MCP\n * server, with the key filled in from the CLI's own settings. */\nexport const DEFAULT_MCP_URL = 'https://mcp.mentio.dev/mcp';\n\nexport type McpClientKind = 'claude' | 'cursor' | 'vscode' | 'generic';\n\nexport function mcpConfig(kind: McpClientKind, url: string, apiKey: string): string {\n const auth = `Bearer ${apiKey}`;\n switch (kind) {\n case 'claude':\n return `claude mcp add --transport http mentio ${url} --header \"Authorization: ${auth}\"`;\n case 'vscode':\n return JSON.stringify({ servers: { mentio: { type: 'http', url, headers: { Authorization: auth } } } }, null, 2);\n case 'cursor':\n return JSON.stringify({ mcpServers: { mentio: { url, headers: { Authorization: auth } } } }, null, 2);\n case 'generic':\n return JSON.stringify({ mcpServers: { mentio: { type: 'http', url, headers: { Authorization: auth } } } }, null, 2);\n }\n}\n","/**\n * How an API operation becomes a CLI command: `noun:verb`, the noun being\n * the resource in the path and the verb the action, so the CLI reads like\n * the REST API and like the Zernio CLI. Pure, so the docs can generate the\n * commands page from the same rule.\n *\n * GET /v1/keywords -> keywords:list\n * GET /v1/mentions -> mentions:search (operationId starts with search)\n * POST /v1/keywords -> keywords:create\n * GET /v1/keywords/{id} -> keywords:get\n * PATCH /v1/keywords/{id} -> keywords:update\n * DELETE /v1/api-keys/{id} -> api-keys:revoke (operationId starts with revoke)\n * POST /v1/people/{id}/merge -> people:merge\n * GET /v1/channels/{id}/deliveries -> channels:deliveries\n * GET /v1/analytics/summary -> analytics:summary\n * GET /v1/mentions/export.csv -> mentions:export\n * GET /v1/company -> company:get\n * GET /v1/health -> system:health\n */\nexport interface OperationRef {\n operationId: string;\n method: string;\n path: string;\n}\n\nexport function commandName(op: OperationRef): string {\n const segments = op.path.replace(/^\\/v1\\//, '').split('/');\n const noun = segments[0] ?? '';\n if (noun === 'health') return 'system:health';\n const rest = segments.slice(1);\n const hasId = rest.some((s) => s.startsWith('{'));\n const action = rest.find((s) => !s.startsWith('{'));\n const method = op.method.toLowerCase();\n let verb: string;\n if (action !== undefined) {\n verb = action === 'export.csv' ? 'export' : action;\n } else if (method === 'get' && !hasId) {\n verb = op.operationId.startsWith('search') ? 'search' : noun === 'company' ? 'get' : 'list';\n } else if (method === 'post' && !hasId) {\n verb = 'create';\n } else if (method === 'get') {\n verb = 'get';\n } else if (method === 'patch') {\n verb = 'update';\n } else if (method === 'delete') {\n verb = op.operationId.startsWith('revoke') ? 'revoke' : 'delete';\n } else {\n verb = method;\n }\n return `${noun}:${verb}`;\n}\n\n/** The group a command is listed under in --help and in the docs. */\nexport function commandGroup(name: string): string {\n return name.split(':')[0] ?? name;\n}\n","// Generated by scripts/generate-operations.ts from ../../sdk/openapi.json. Do not edit.\nimport type { CliOperation } from '../operations-types';\n\nexport const OPERATIONS: readonly CliOperation[] = [\n {\n \"operationId\": \"getHealth\",\n \"method\": \"GET\",\n \"path\": \"/v1/health\",\n \"summary\": \"getHealth\",\n \"tag\": \"System\",\n \"params\": [],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"createKeyword\",\n \"method\": \"POST\",\n \"path\": \"/v1/keywords\",\n \"summary\": \"Track a keyword\",\n \"description\": \"Start tracking a word or phrase. Matching, classification and delivery begin on the next poll. Free workspaces track 2 keywords; a subscription raises that to 500.\",\n \"tag\": \"Keywords\",\n \"params\": [],\n \"body\": {\n \"fields\": [\n {\n \"name\": \"term\",\n \"type\": \"string\",\n \"description\": \"The word or phrase to track, matched case-insensitively as a phrase.\",\n \"required\": true,\n \"nullable\": false\n },\n {\n \"name\": \"kind\",\n \"type\": \"string\",\n \"description\": \"brand: your own names. competitor: theirs. topic: the space. Drives share of voice and segments.\",\n \"enum\": [\n \"brand\",\n \"competitor\",\n \"topic\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"type\": \"array\",\n \"description\": \"Platforms to track it on; omit or null for every platform.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": true,\n \"items\": \"string\"\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"listKeywords\",\n \"method\": \"GET\",\n \"path\": \"/v1/keywords\",\n \"summary\": \"List keywords\",\n \"description\": \"Every keyword of the workspace, newest first, with its match stats and poll health.\",\n \"tag\": \"Keywords\",\n \"params\": [],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getKeyword\",\n \"method\": \"GET\",\n \"path\": \"/v1/keywords/{id}\",\n \"summary\": \"Get a keyword\",\n \"tag\": \"Keywords\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Keyword id (kw_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"updateKeyword\",\n \"method\": \"PATCH\",\n \"path\": \"/v1/keywords/{id}\",\n \"summary\": \"Update a keyword\",\n \"description\": \"Mute or unmute it, or change the platforms it is tracked on.\",\n \"tag\": \"Keywords\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Keyword id (kw_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": {\n \"description\": \"Omitted fields are untouched.\",\n \"fields\": [\n {\n \"name\": \"muted\",\n \"type\": \"boolean\",\n \"description\": \"A muted keyword stops polling and matching; its mentions stay.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"type\": \"array\",\n \"description\": \"Replaces the platform list; null means every platform.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": true,\n \"items\": \"string\"\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"deleteKeyword\",\n \"method\": \"DELETE\",\n \"path\": \"/v1/keywords/{id}\",\n \"summary\": \"Delete a keyword\",\n \"description\": \"Removes the keyword and its matches. Posts also matched by another keyword stay.\",\n \"tag\": \"Keywords\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Keyword id (kw_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"none\"\n },\n {\n \"operationId\": \"updateMention\",\n \"method\": \"PATCH\",\n \"path\": \"/v1/mentions/{id}\",\n \"summary\": \"Update a mention\",\n \"description\": \"The one write on a mention. Set status to ignored or done to handle it (open puts it back), assign it to a workspace member, snooze it out of the feed, or leave an internal note. Null clears a field; omitted fields are untouched. Delivery and billing never change.\",\n \"tag\": \"Mentions\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Mention id (mm_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": {\n \"description\": \"Every field is optional; omitted fields are untouched.\",\n \"fields\": [\n {\n \"name\": \"status\",\n \"type\": \"string\",\n \"description\": \"ignored or done to handle it; open to put it back.\",\n \"enum\": [\n \"open\",\n \"ignored\",\n \"done\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"assigneeId\",\n \"type\": \"string\",\n \"description\": \"A workspace member (user id), or null to unassign.\",\n \"required\": false,\n \"nullable\": true\n },\n {\n \"name\": \"snoozedUntil\",\n \"type\": \"integer\",\n \"description\": \"ISO 8601 (or epoch ms) until which the mention leaves the feed; null wakes it.\",\n \"required\": false,\n \"nullable\": true\n },\n {\n \"name\": \"note\",\n \"type\": \"string\",\n \"description\": \"Internal note; null or empty clears it.\",\n \"required\": false,\n \"nullable\": true\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getMention\",\n \"method\": \"GET\",\n \"path\": \"/v1/mentions/{id}\",\n \"summary\": \"Get a mention\",\n \"description\": \"One mention by id, as it appears in the list: the post, its author with reach and your tags, the classification, the priority score and the triage fields. Ids belong to your organization; any other id is a 404.\",\n \"tag\": \"Mentions\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Mention id (mm_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"searchMentions\",\n \"method\": \"GET\",\n \"path\": \"/v1/mentions\",\n \"summary\": \"List mentions\",\n \"description\": \"Mentions matched to your keywords, filtered and paginated. Default order is newest match first; sort=priority ranks by attention score. Page with nextCursor, passing the same filters and sort. A mention is one post matched to one keyword.\",\n \"tag\": \"Mentions\",\n \"params\": [\n {\n \"name\": \"keywordId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only matches of this keyword.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platform\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only posts from this platform.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"status\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only mentions in this status. Omit for every status.\",\n \"enum\": [\n \"open\",\n \"ignored\",\n \"done\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"relevant\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: only mentions the classifier scored relevant; false: only the rest (unclassified included).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"sentiment\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only this sentiment.\",\n \"enum\": [\n \"positive\",\n \"neutral\",\n \"negative\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"intent\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only mentions carrying this intent (buy_intent, question, complaint, praise, comparison).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"personId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only this person (an id from /v1/people), merged accounts included. Implies includeMuted.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"includeMuted\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: include mentions by people you muted, hidden by default.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"assigneeId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only mentions assigned to this workspace member (user id).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"snoozed\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: only mentions currently snoozed. Otherwise snoozed mentions stay out until they wake.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"excludeAuthors\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Hide these authors: display names, handles or profile URLs. Repeatable, or one comma-separated value.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minRelevance\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only mentions scored at least this; unclassified ones are excluded.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minFollowers\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only authors with at least this many followers. Unknown reach never passes.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"tags\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Only authors your workspace tagged with any of these (exact, case-sensitive). Repeatable, or comma-separated.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"q\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Substring search in the post text.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"since\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only posts published at or after this instant (ISO 8601, or epoch ms).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"until\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only posts published at or before this instant (ISO 8601, or epoch ms).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"sort\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"newest: by match time, newest first. priority: by attention score, highest first. Cursors are specific to a sort.\",\n \"enum\": [\n \"newest\",\n \"priority\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"cursor\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"nextCursor from the previous page; pass the same filters and sort.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"limit\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Page size, 1 to 100.\",\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"exportMentionsCsv\",\n \"method\": \"GET\",\n \"path\": \"/v1/mentions/export.csv\",\n \"summary\": \"Export mentions as CSV\",\n \"description\": \"The same mentions GET /v1/mentions would list for these filters, as CSV, newest published first: id, published_at, platform, keyword, author, author_url, author_followers, relevance, sentiment, intents (pipe-separated), status, relevant, delivered, url, text (first 1,000 characters). Capped at 10,000 rows; the X-Mentions-Truncated header says when the cap cut the list.\",\n \"tag\": \"Mentions\",\n \"params\": [\n {\n \"name\": \"keywordId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only matches of this keyword.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platform\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only posts from this platform.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"status\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only mentions in this status. Omit for every status.\",\n \"enum\": [\n \"open\",\n \"ignored\",\n \"done\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"relevant\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: only mentions the classifier scored relevant; false: only the rest (unclassified included).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"sentiment\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only this sentiment.\",\n \"enum\": [\n \"positive\",\n \"neutral\",\n \"negative\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"intent\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only mentions carrying this intent (buy_intent, question, complaint, praise, comparison).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"personId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only this person (an id from /v1/people), merged accounts included. Implies includeMuted.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"includeMuted\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: include mentions by people you muted, hidden by default.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"assigneeId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only mentions assigned to this workspace member (user id).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"snoozed\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: only mentions currently snoozed. Otherwise snoozed mentions stay out until they wake.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"excludeAuthors\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Hide these authors: display names, handles or profile URLs. Repeatable, or one comma-separated value.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minRelevance\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only mentions scored at least this; unclassified ones are excluded.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minFollowers\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only authors with at least this many followers. Unknown reach never passes.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"tags\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Only authors your workspace tagged with any of these (exact, case-sensitive). Repeatable, or comma-separated.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"q\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Substring search in the post text.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"since\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only posts published at or after this instant (ISO 8601, or epoch ms).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"until\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only posts published at or before this instant (ISO 8601, or epoch ms).\",\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"csv\"\n },\n {\n \"operationId\": \"exportPeopleCsv\",\n \"method\": \"GET\",\n \"path\": \"/v1/people/export.csv\",\n \"summary\": \"Export people as CSV\",\n \"description\": \"The same list as GET /v1/people (segmentId included) as CSV, one row per person with their contact columns: handle, followers, email, website, company, location, tags. Capped at 5,000 people.\",\n \"tag\": \"People\",\n \"params\": [\n {\n \"name\": \"platform\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"People with an account on this platform.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"q\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Matches the display name or the profile handle or URL, case-insensitively.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"tag\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only people carrying this tag (exact, case-sensitive).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"muted\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: only muted people; false: only unmuted; omitted: everyone.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"since\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only people whose first matched mention is at or after this instant (ISO 8601, or epoch ms).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"segmentId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"A saved segment applied on top of every other filter here. Unknown id: 404.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"People with an account on any of these platforms. Repeatable, or comma-separated.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"tags\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"People carrying any of these tags. Repeatable, or comma-separated.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minFollowers\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At least this many followers. Unknown reach never matches.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"maxFollowers\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At most this many followers.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minMentions\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At least this many matched mentions.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minNegative\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At least this many negative mentions.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"intents\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"At least one mention carrying any of these intents.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"keywordKinds\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Mentioned a keyword of any of these kinds.\",\n \"enum\": [\n \"brand\",\n \"competitor\",\n \"topic\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"neverKeywordKinds\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Never mentioned a keyword of these kinds.\",\n \"enum\": [\n \"brand\",\n \"competitor\",\n \"topic\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"newSinceDays\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"First seen within this many days.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"sort\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"mentions: most matches first. recent: last seen first. reach: most followers first, unknown last. new: first seen most recently first.\",\n \"enum\": [\n \"mentions\",\n \"recent\",\n \"reach\",\n \"new\"\n ],\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"csv\"\n },\n {\n \"operationId\": \"listPeople\",\n \"method\": \"GET\",\n \"path\": \"/v1/people\",\n \"summary\": \"List people\",\n \"description\": \"The people behind your mentions: one row per person, with their accounts, reach, public profile, per-workspace stats and your annotations. Filter by platform, tag, follower range, mention counts, intents seen, keyword kinds mentioned or never mentioned, or a saved segment. Offset-paginated with a total.\",\n \"tag\": \"People\",\n \"params\": [\n {\n \"name\": \"platform\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"People with an account on this platform.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"q\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Matches the display name or the profile handle or URL, case-insensitively.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"tag\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Only people carrying this tag (exact, case-sensitive).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"muted\",\n \"in\": \"query\",\n \"type\": \"boolean\",\n \"description\": \"true: only muted people; false: only unmuted; omitted: everyone.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"since\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Only people whose first matched mention is at or after this instant (ISO 8601, or epoch ms).\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"segmentId\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"A saved segment applied on top of every other filter here. Unknown id: 404.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"People with an account on any of these platforms. Repeatable, or comma-separated.\",\n \"enum\": [\n \"bluesky\",\n \"hackernews\",\n \"github\",\n \"stackoverflow\",\n \"devto\",\n \"reddit\",\n \"x\",\n \"youtube\",\n \"news\",\n \"linkedin\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"tags\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"People carrying any of these tags. Repeatable, or comma-separated.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minFollowers\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At least this many followers. Unknown reach never matches.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"maxFollowers\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At most this many followers.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minMentions\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At least this many matched mentions.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"minNegative\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"At least this many negative mentions.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"intents\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"At least one mention carrying any of these intents.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"keywordKinds\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Mentioned a keyword of any of these kinds.\",\n \"enum\": [\n \"brand\",\n \"competitor\",\n \"topic\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"neverKeywordKinds\",\n \"in\": \"query\",\n \"type\": \"array\",\n \"description\": \"Never mentioned a keyword of these kinds.\",\n \"enum\": [\n \"brand\",\n \"competitor\",\n \"topic\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"newSinceDays\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"First seen within this many days.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"sort\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"mentions: most matches first. recent: last seen first. reach: most followers first, unknown last. new: first seen most recently first.\",\n \"enum\": [\n \"mentions\",\n \"recent\",\n \"reach\",\n \"new\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"limit\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Page size, 1 to 100.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"offset\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"description\": \"Skip this many people. Offset paging: a grouped read over hundreds of people, not a stream.\",\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getPerson\",\n \"method\": \"GET\",\n \"path\": \"/v1/people/{id}\",\n \"summary\": \"Get a person\",\n \"description\": \"One person as your workspace sees them. An account merged into someone resolves to that person.\",\n \"tag\": \"People\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Person id (aut_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"updatePerson\",\n \"method\": \"PATCH\",\n \"path\": \"/v1/people/{id}\",\n \"summary\": \"Update your annotations on a person\",\n \"description\": \"Tags, notes and mute, for your workspace only. Mute hides their posts from your feed and every channel; ingest and billing never change.\",\n \"tag\": \"People\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Person id (aut_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": {\n \"description\": \"Omitted fields are untouched.\",\n \"fields\": [\n {\n \"name\": \"tags\",\n \"type\": \"array\",\n \"description\": \"Replaces the whole list.\",\n \"required\": false,\n \"nullable\": false,\n \"items\": \"string\"\n },\n {\n \"name\": \"notes\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"muted\",\n \"type\": \"boolean\",\n \"required\": false,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"mergePeople\",\n \"method\": \"POST\",\n \"path\": \"/v1/people/{id}/merge\",\n \"summary\": \"Merge an account into a person\",\n \"description\": \"Declare that this account and another person are the same human, for your workspace only. Their mentions, tags and notes combine under the person named by `into`.\",\n \"tag\": \"People\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Person id (aut_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": {\n \"fields\": [\n {\n \"name\": \"into\",\n \"type\": \"string\",\n \"description\": \"The person to fold this account into (their id).\",\n \"required\": true,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"splitPerson\",\n \"method\": \"POST\",\n \"path\": \"/v1/people/{id}/split\",\n \"summary\": \"Undo a merge\",\n \"description\": \"The account becomes its own person again.\",\n \"tag\": \"People\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Person id (aut_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"listSegments\",\n \"method\": \"GET\",\n \"path\": \"/v1/segments\",\n \"summary\": \"List segments\",\n \"description\": \"Your saved segments, each with the number of people in it right now (segments are evaluated on every read, never materialized), plus presets you can save as a starting point. Pass a segment id to GET /v1/people to list its members.\",\n \"tag\": \"Segments\",\n \"params\": [],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"createSegment\",\n \"method\": \"POST\",\n \"path\": \"/v1/segments\",\n \"summary\": \"Create a segment\",\n \"tag\": \"Segments\",\n \"params\": [],\n \"body\": {\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"required\": true,\n \"nullable\": false\n },\n {\n \"name\": \"description\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"filter\",\n \"type\": \"object\",\n \"required\": false,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getSegment\",\n \"method\": \"GET\",\n \"path\": \"/v1/segments/{id}\",\n \"summary\": \"Get a segment\",\n \"tag\": \"Segments\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Segment id (seg_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"updateSegment\",\n \"method\": \"PATCH\",\n \"path\": \"/v1/segments/{id}\",\n \"summary\": \"Update a segment\",\n \"tag\": \"Segments\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Segment id (seg_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": {\n \"description\": \"Omitted fields are untouched.\",\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"description\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"filter\",\n \"type\": \"object\",\n \"description\": \"Replaces the whole filter.\",\n \"required\": false,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"deleteSegment\",\n \"method\": \"DELETE\",\n \"path\": \"/v1/segments/{id}\",\n \"summary\": \"Delete a segment\",\n \"description\": \"Nobody in it is affected.\",\n \"tag\": \"Segments\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Segment id (seg_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"none\"\n },\n {\n \"operationId\": \"getCompany\",\n \"method\": \"GET\",\n \"path\": \"/v1/company\",\n \"summary\": \"Get the company profile\",\n \"description\": \"What the classifier knows about you: name, description, use cases, your own accounts, and the composed context it reads.\",\n \"tag\": \"Company\",\n \"params\": [],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"updateCompany\",\n \"method\": \"PATCH\",\n \"path\": \"/v1/company\",\n \"summary\": \"Update the company profile\",\n \"description\": \"Changing profile fields recomposes the classifier context; setting `context` directly overrides it until the next profile edit. Relevance scores for new mentions follow at once.\",\n \"tag\": \"Company\",\n \"params\": [],\n \"body\": {\n \"description\": \"Omitted fields are untouched.\",\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"description\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"useCases\",\n \"type\": \"array\",\n \"description\": \"Replaces the whole list.\",\n \"required\": false,\n \"nullable\": false,\n \"items\": \"string\"\n },\n {\n \"name\": \"accounts\",\n \"type\": \"object\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"context\",\n \"type\": \"string\",\n \"description\": \"Overrides the composed context until the next profile edit.\",\n \"required\": false,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"createApiKey\",\n \"method\": \"POST\",\n \"path\": \"/v1/api-keys\",\n \"summary\": \"Create an API key\",\n \"description\": \"Mint a key for this workspace. The key itself is returned once; only its hash is stored.\",\n \"tag\": \"API keys\",\n \"params\": [],\n \"body\": {\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"description\": \"A label for the key; \\\"default\\\" when omitted.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"scope\",\n \"type\": \"string\",\n \"description\": \"read: GET only. write: everything.\",\n \"enum\": [\n \"read\",\n \"write\"\n ],\n \"required\": false,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"listApiKeys\",\n \"method\": \"GET\",\n \"path\": \"/v1/api-keys\",\n \"summary\": \"List API keys\",\n \"tag\": \"API keys\",\n \"params\": [],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"revokeApiKey\",\n \"method\": \"DELETE\",\n \"path\": \"/v1/api-keys/{id}\",\n \"summary\": \"Revoke an API key\",\n \"description\": \"Takes effect at once on the API and within a few minutes on cached verifications.\",\n \"tag\": \"API keys\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"API key id (key_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"none\"\n },\n {\n \"operationId\": \"getAlert\",\n \"method\": \"GET\",\n \"path\": \"/v1/alerts/{id}\",\n \"summary\": \"Get an alert\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Alert id (feed_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"updateAlert\",\n \"method\": \"PATCH\",\n \"path\": \"/v1/alerts/{id}\",\n \"summary\": \"Update an alert\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Alert id (feed_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": {\n \"description\": \"Omitted fields are untouched.\",\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"enabled\",\n \"type\": \"boolean\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"mode\",\n \"type\": \"string\",\n \"enum\": [\n \"instant\",\n \"daily\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"filter\",\n \"type\": \"object\",\n \"description\": \"Replaces the whole filter.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"schedule\",\n \"type\": \"object\",\n \"required\": false,\n \"nullable\": true\n },\n {\n \"name\": \"event\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": true\n },\n {\n \"name\": \"channelIds\",\n \"type\": \"array\",\n \"description\": \"Replaces the whole list.\",\n \"required\": false,\n \"nullable\": false,\n \"items\": \"string\"\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"deleteAlert\",\n \"method\": \"DELETE\",\n \"path\": \"/v1/alerts/{id}\",\n \"summary\": \"Delete an alert\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Alert id (feed_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"none\"\n },\n {\n \"operationId\": \"listAlerts\",\n \"method\": \"GET\",\n \"path\": \"/v1/alerts\",\n \"summary\": \"List alerts\",\n \"tag\": \"Alerts\",\n \"params\": [],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"createAlert\",\n \"method\": \"POST\",\n \"path\": \"/v1/alerts\",\n \"summary\": \"Create an alert\",\n \"tag\": \"Alerts\",\n \"params\": [],\n \"body\": {\n \"fields\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"required\": true,\n \"nullable\": false\n },\n {\n \"name\": \"enabled\",\n \"type\": \"boolean\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"mode\",\n \"type\": \"string\",\n \"enum\": [\n \"instant\",\n \"daily\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"filter\",\n \"type\": \"object\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"schedule\",\n \"type\": \"object\",\n \"description\": \"Required for daily alerts.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"event\",\n \"type\": \"string\",\n \"description\": \"Custom event name for webhook payloads; null for the mode default.\",\n \"required\": false,\n \"nullable\": true\n },\n {\n \"name\": \"channelIds\",\n \"type\": \"array\",\n \"description\": \"Channel ids from GET /v1/channels.\",\n \"required\": false,\n \"nullable\": false,\n \"items\": \"string\"\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"testAlert\",\n \"method\": \"POST\",\n \"path\": \"/v1/alerts/{id}/test\",\n \"summary\": \"Send a test through an alert's channels\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Alert id (feed_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"runAlertDigest\",\n \"method\": \"POST\",\n \"path\": \"/v1/alerts/{id}/run\",\n \"summary\": \"Send a digest now\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Alert id (feed_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getAnalyticsSummary\",\n \"method\": \"GET\",\n \"path\": \"/v1/analytics/summary\",\n \"summary\": \"Headline counts for a window\",\n \"description\": \"Matched and relevant mentions, distinct posts and people, sentiment, buying intent and questions, estimated reach, and where the matches stand in triage. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\",\n \"tag\": \"Analytics\",\n \"params\": [\n {\n \"name\": \"range\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Preset window ending today. Ignored when from or to is given. Default 30d.\",\n \"enum\": [\n \"7d\",\n \"30d\",\n \"90d\",\n \"365d\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"from\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"First day, YYYY-MM-DD, inclusive, in `timezone`.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"to\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Last day, YYYY-MM-DD, inclusive, in `timezone`. Default today.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"keywordIds\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated keyword ids; omit for every keyword.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated platforms (bluesky, hackernews, github, ...); omit for every platform.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"compare\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"true adds the period of the same length right before the window as `previous`.\",\n \"enum\": [\n \"true\",\n \"false\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"timezone\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"IANA zone the days are cut in (Europe/Madrid). Default UTC. One offset, the zone's at the end of the window, applies to the whole window.\",\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getAnalyticsSeries\",\n \"method\": \"GET\",\n \"path\": \"/v1/analytics/series\",\n \"summary\": \"Mentions over time\",\n \"description\": \"Matched, relevant and sentiment counts per day or week across the window, as one total series or split per platform or per keyword with `by`. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\",\n \"tag\": \"Analytics\",\n \"params\": [\n {\n \"name\": \"range\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Preset window ending today. Ignored when from or to is given. Default 30d.\",\n \"enum\": [\n \"7d\",\n \"30d\",\n \"90d\",\n \"365d\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"from\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"First day, YYYY-MM-DD, inclusive, in `timezone`.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"to\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Last day, YYYY-MM-DD, inclusive, in `timezone`. Default today.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"keywordIds\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated keyword ids; omit for every keyword.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated platforms (bluesky, hackernews, github, ...); omit for every platform.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"compare\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"true adds the period of the same length right before the window as `previous`.\",\n \"enum\": [\n \"true\",\n \"false\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"timezone\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"IANA zone the days are cut in (Europe/Madrid). Default UTC. One offset, the zone's at the end of the window, applies to the whole window.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"bucket\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Point granularity. Default: day up to 90 days, week beyond. Weeks start on Monday.\",\n \"enum\": [\n \"day\",\n \"week\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"by\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Split into one series per platform or per keyword (the top 20 by matched, the rest folded into \\\"other\\\"). Omit for one total series.\",\n \"enum\": [\n \"platform\",\n \"keyword\"\n ],\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getAnalyticsBreakdown\",\n \"method\": \"GET\",\n \"path\": \"/v1/analytics/breakdown\",\n \"summary\": \"Mentions grouped by one dimension\",\n \"description\": \"One table of matched, relevant and sentiment counts grouped by `by`: platform, keyword, sentiment, intent, status, hour (weekday and hour of day) or person. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\",\n \"tag\": \"Analytics\",\n \"params\": [\n {\n \"name\": \"range\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Preset window ending today. Ignored when from or to is given. Default 30d.\",\n \"enum\": [\n \"7d\",\n \"30d\",\n \"90d\",\n \"365d\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"from\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"First day, YYYY-MM-DD, inclusive, in `timezone`.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"to\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Last day, YYYY-MM-DD, inclusive, in `timezone`. Default today.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"keywordIds\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated keyword ids; omit for every keyword.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated platforms (bluesky, hackernews, github, ...); omit for every platform.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"compare\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"true adds the period of the same length right before the window as `previous`.\",\n \"enum\": [\n \"true\",\n \"false\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"timezone\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"IANA zone the days are cut in (Europe/Madrid). Default UTC. One offset, the zone's at the end of the window, applies to the whole window.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"by\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"The dimension to group by: platform, keyword, sentiment (unclassified included), intent (a mention can carry several), status (open, ignored, done), hour (weekday and hour of day in `timezone`), person (who posted; anonymous posts are left out).\",\n \"enum\": [\n \"platform\",\n \"keyword\",\n \"sentiment\",\n \"intent\",\n \"status\",\n \"hour\",\n \"person\"\n ],\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getShareOfVoice\",\n \"method\": \"GET\",\n \"path\": \"/v1/analytics/share-of-voice\",\n \"summary\": \"Brand against competitors\",\n \"description\": \"Every keyword matched in the window with its counts and its share of brand plus competitor matches; topic keywords are counted but stay out of the split. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\",\n \"tag\": \"Analytics\",\n \"params\": [\n {\n \"name\": \"range\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Preset window ending today. Ignored when from or to is given. Default 30d.\",\n \"enum\": [\n \"7d\",\n \"30d\",\n \"90d\",\n \"365d\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"from\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"First day, YYYY-MM-DD, inclusive, in `timezone`.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"to\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Last day, YYYY-MM-DD, inclusive, in `timezone`. Default today.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"keywordIds\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated keyword ids; omit for every keyword.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"platforms\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"Comma-separated platforms (bluesky, hackernews, github, ...); omit for every platform.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"compare\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"true adds the period of the same length right before the window as `previous`.\",\n \"enum\": [\n \"true\",\n \"false\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"timezone\",\n \"in\": \"query\",\n \"type\": \"string\",\n \"description\": \"IANA zone the days are cut in (Europe/Madrid). Default UTC. One offset, the zone's at the end of the window, applies to the whole window.\",\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"getChannel\",\n \"method\": \"GET\",\n \"path\": \"/v1/channels/{id}\",\n \"summary\": \"Get a channel\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Channel id (dest_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"updateChannel\",\n \"method\": \"PATCH\",\n \"path\": \"/v1/channels/{id}\",\n \"summary\": \"Update a channel\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Channel id (dest_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": {\n \"description\": \"Omitted fields are untouched.\",\n \"fields\": [\n {\n \"name\": \"label\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"url\",\n \"type\": \"string\",\n \"description\": \"Webhooks only.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"headers\",\n \"type\": \"object\",\n \"description\": \"Webhooks only; replaces the whole set.\",\n \"required\": false,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n },\n {\n \"operationId\": \"deleteChannel\",\n \"method\": \"DELETE\",\n \"path\": \"/v1/channels/{id}\",\n \"summary\": \"Delete a channel\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Channel id (dest_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"none\"\n },\n {\n \"operationId\": \"testChannel\",\n \"method\": \"POST\",\n \"path\": \"/v1/channels/{id}/test\",\n \"summary\": \"Send a test to a channel\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Channel id (dest_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"rotateWebhookSecret\",\n \"method\": \"POST\",\n \"path\": \"/v1/channels/{id}/rotate-secret\",\n \"summary\": \"Rotate a webhook secret\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Channel id (dest_...).\",\n \"required\": true,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"listChannelDeliveries\",\n \"method\": \"GET\",\n \"path\": \"/v1/channels/{id}/deliveries\",\n \"summary\": \"List deliveries to a channel\",\n \"tag\": \"Alerts\",\n \"params\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"type\": \"string\",\n \"description\": \"Channel id (dest_...).\",\n \"required\": true,\n \"nullable\": false\n },\n {\n \"name\": \"limit\",\n \"in\": \"query\",\n \"type\": \"integer\",\n \"required\": false,\n \"nullable\": false\n }\n ],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"listChannels\",\n \"method\": \"GET\",\n \"path\": \"/v1/channels\",\n \"summary\": \"List channels\",\n \"tag\": \"Alerts\",\n \"params\": [],\n \"body\": null,\n \"response\": \"json\"\n },\n {\n \"operationId\": \"createChannel\",\n \"method\": \"POST\",\n \"path\": \"/v1/channels\",\n \"summary\": \"Create a channel\",\n \"tag\": \"Alerts\",\n \"params\": [],\n \"body\": {\n \"fields\": [\n {\n \"name\": \"kind\",\n \"type\": \"string\",\n \"enum\": [\n \"slack\",\n \"email\",\n \"webhook\"\n ],\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"channelId\",\n \"type\": \"string\",\n \"description\": \"A Slack channel id from the connected workspace.\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"channelName\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"emails\",\n \"type\": \"array\",\n \"description\": \"Each address gets a confirmation link; workspace members are confirmed on sight.\",\n \"required\": false,\n \"nullable\": false,\n \"items\": \"string\"\n },\n {\n \"name\": \"url\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"label\",\n \"type\": \"string\",\n \"required\": false,\n \"nullable\": false\n },\n {\n \"name\": \"headers\",\n \"type\": \"object\",\n \"required\": false,\n \"nullable\": false\n }\n ]\n },\n \"response\": \"json\"\n }\n];\n","/**\n * What the CLI prints. JSON always, compact when piped and indented on a\n * terminal or with --pretty, so `mentio ... | jq` and a human both get what\n * they expect. --table renders a list's `data` as columns for a quick look.\n */\nexport interface OutputOptions {\n pretty: boolean;\n table: boolean;\n}\n\ntype Scalar = string | number | boolean | null;\n\nconst isScalar = (v: unknown): v is Scalar => v === null || ['string', 'number', 'boolean'].includes(typeof v);\n\nconst cell = (v: Scalar): string => {\n if (v === null) return '';\n if (typeof v === 'string') return v.length > 48 ? `${v.slice(0, 47)}…` : v.replace(/\\s+/g, ' ');\n return String(v);\n};\n\n/** Rows to a fixed-width table over the scalar columns of the first row. */\nexport function renderTable(rows: ReadonlyArray<Record<string, unknown>>): string {\n const first = rows[0];\n if (!first) return '(no rows)';\n const columns = Object.keys(first).filter((k) => isScalar(first[k])).slice(0, 8);\n if (columns.length === 0) return JSON.stringify(rows, null, 2);\n const lines = rows.map((row) => columns.map((c) => cell(isScalar(row[c]) ? (row[c] as Scalar) : JSON.stringify(row[c]))));\n const widths = columns.map((c, i) => Math.max(c.length, ...lines.map((l) => l[i]?.length ?? 0)));\n const pad = (s: string, w: number): string => s.padEnd(w);\n const header = columns.map((c, i) => pad(c, widths[i] ?? c.length)).join(' ');\n const rule = widths.map((w) => '-'.repeat(w)).join(' ');\n const body = lines.map((l) => l.map((s, i) => pad(s, widths[i] ?? s.length)).join(' '));\n return [header, rule, ...body].join('\\n');\n}\n\nexport function formatOutput(value: unknown, options: OutputOptions): string {\n if (options.table) {\n const rows = Array.isArray(value)\n ? value\n : value !== null && typeof value === 'object' && Array.isArray((value as { data?: unknown }).data)\n ? (value as { data: unknown[] }).data\n : null;\n if (rows && rows.every((r) => r !== null && typeof r === 'object')) {\n return renderTable(rows as Record<string, unknown>[]);\n }\n }\n return options.pretty ? JSON.stringify(value, null, 2) : JSON.stringify(value);\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen';\n\nexport type QuerySerializer = (query: Record<string, unknown>) => string;\n\nexport type BodySerializer = (body: unknown) => unknown;\n\ntype QuerySerializerOptionsObject = {\n allowReserved?: boolean;\n array?: Partial<SerializerOptions<ArrayStyle>>;\n object?: Partial<SerializerOptions<ObjectStyle>>;\n};\n\nexport type QuerySerializerOptions = QuerySerializerOptionsObject & {\n /**\n * Per-parameter serialization overrides. When provided, these settings\n * override the global array/object settings for specific parameter names.\n */\n parameters?: Record<string, QuerySerializerOptionsObject>;\n};\n\nconst serializeFormDataPair = (data: FormData, key: string, value: unknown): void => {\n if (typeof value === 'string' || value instanceof Blob) {\n data.append(key, value);\n } else if (value instanceof Date) {\n data.append(key, value.toISOString());\n } else {\n data.append(key, JSON.stringify(value));\n }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown): void => {\n if (typeof value === 'string') {\n data.append(key, value);\n } else {\n data.append(key, JSON.stringify(value));\n }\n};\n\nexport const formDataBodySerializer = {\n bodySerializer: (body: unknown): FormData => {\n const data = new FormData();\n\n Object.entries(body as Record<string, unknown>).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((v) => serializeFormDataPair(data, key, v));\n } else {\n serializeFormDataPair(data, key, value);\n }\n });\n\n return data;\n },\n};\n\nexport const jsonBodySerializer = {\n bodySerializer: (body: unknown): string =>\n JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n bodySerializer: (body: unknown): string => {\n const data = new URLSearchParams();\n\n Object.entries(body as Record<string, unknown>).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((v) => serializeUrlSearchParamsPair(data, key, v));\n } else {\n serializeUrlSearchParamsPair(data, key, value);\n }\n });\n\n return data.toString();\n },\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\ntype Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n | {\n in: Exclude<Slot, 'body'>;\n /**\n * Field name. This is the name we want the user to see and use.\n */\n key: string;\n /**\n * Field mapped name. This is the name we want to use in the request.\n * If omitted, we use the same value as `key`.\n */\n map?: string;\n }\n | {\n in: Extract<Slot, 'body'>;\n /**\n * Key isn't required for bodies.\n */\n key?: string;\n map?: string;\n }\n | {\n /**\n * Field name. This is the name we want the user to see and use.\n */\n key: string;\n /**\n * Field mapped name. This is the name we want to use in the request.\n * If `in` is omitted, `map` aliases `key` to the transport layer.\n */\n map: Slot;\n };\n\nexport interface Fields {\n allowExtra?: Partial<Record<Slot, boolean>>;\n args?: ReadonlyArray<Field>;\n}\n\nexport type FieldsConfig = ReadonlyArray<Field | Fields>;\n\nconst extraPrefixesMap: Record<string, Slot> = {\n $body_: 'body',\n $headers_: 'headers',\n $path_: 'path',\n $query_: 'query',\n};\nconst extraPrefixes = Object.entries(extraPrefixesMap);\n\ntype KeyMap = Map<\n string,\n | {\n in: Slot;\n map?: string;\n }\n | {\n in?: never;\n map: Slot;\n }\n>;\n\nfunction buildKeyMap(fields: FieldsConfig, map?: KeyMap): KeyMap {\n if (!map) {\n map = new Map();\n }\n\n for (const config of fields) {\n if ('in' in config) {\n if (config.key) {\n map.set(config.key, {\n in: config.in,\n map: config.map,\n });\n }\n } else if ('key' in config) {\n map.set(config.key, {\n map: config.map,\n });\n } else if (config.args) {\n buildKeyMap(config.args, map);\n }\n }\n\n return map;\n}\n\ninterface Params {\n body?: unknown;\n headers: Record<string, unknown>;\n path: Record<string, unknown>;\n query: Record<string, unknown>;\n}\n\nfunction stripEmptySlots(params: Params): void {\n for (const [slot, value] of Object.entries(params)) {\n if (slot === 'body') continue;\n if (value && typeof value === 'object' && !Array.isArray(value) && !Object.keys(value).length) {\n delete params[slot as Slot];\n }\n }\n}\n\nexport function buildClientParams(args: ReadonlyArray<unknown>, fields: FieldsConfig): Params {\n const params: Params = {\n headers: Object.create(null),\n path: Object.create(null),\n query: Object.create(null),\n };\n\n const map = buildKeyMap(fields);\n\n function writeSlot(slot: Slot, key: string, value: unknown): void {\n let record = params[slot] as Record<string, unknown> | undefined;\n if (record === undefined) {\n record = Object.create(null) as Record<string, unknown>;\n params[slot] = record;\n }\n record[key] = value;\n }\n\n let config: FieldsConfig[number] | undefined;\n\n for (const [index, arg] of args.entries()) {\n if (fields[index]) {\n config = fields[index];\n }\n\n if (!config) {\n continue;\n }\n\n if ('in' in config) {\n if (config.key) {\n const field = map.get(config.key)!;\n const name = field.map || config.key;\n if (field.in) {\n writeSlot(field.in, name, arg);\n }\n } else {\n params.body = arg;\n }\n } else {\n for (const [key, value] of Object.entries(arg ?? {})) {\n const field = map.get(key);\n\n if (field) {\n if (field.in) {\n const name = field.map || key;\n writeSlot(field.in, name, value);\n } else {\n params[field.map] = value;\n }\n } else {\n const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));\n\n if (extra) {\n const [prefix, slot] = extra;\n writeSlot(slot, key.slice(prefix.length), value);\n } else if ('allowExtra' in config && config.allowExtra) {\n for (const [slot, allowed] of Object.entries(config.allowExtra)) {\n if (allowed) {\n writeSlot(slot as Slot, key, value);\n break;\n }\n }\n }\n }\n }\n }\n }\n\n stripEmptySlots(params);\n\n return params;\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen';\n\nexport type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> &\n Pick<Config, 'method' | 'responseTransformer' | 'responseValidator'> & {\n /**\n * Fetch API implementation. You can use this option to provide a custom\n * fetch instance.\n *\n * @default globalThis.fetch\n */\n fetch?: typeof fetch;\n /**\n * Implementing clients can call request interceptors inside this hook.\n */\n onRequest?: (url: string, init: RequestInit) => Promise<Request>;\n /**\n * Callback invoked when a network or parsing error occurs during streaming.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @param error The error that occurred.\n */\n onSseError?: (error: unknown) => void;\n /**\n * Callback invoked when an event is streamed from the server.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @param event Event streamed from the server.\n * @returns Nothing (void).\n */\n onSseEvent?: (event: StreamEvent<TData>) => void;\n serializedBody?: RequestInit['body'];\n /**\n * Default retry delay in milliseconds.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @default 3000\n */\n sseDefaultRetryDelay?: number;\n /**\n * Maximum number of retry attempts before giving up.\n */\n sseMaxRetryAttempts?: number;\n /**\n * Maximum retry delay in milliseconds.\n *\n * Applies only when exponential backoff is used.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @default 30000\n */\n sseMaxRetryDelay?: number;\n /**\n * Optional sleep function for retry backoff.\n *\n * Defaults to using `setTimeout`.\n */\n sseSleepFn?: (ms: number) => Promise<void>;\n url: string;\n };\n\nexport interface StreamEvent<TData = unknown> {\n data: TData;\n event?: string;\n id?: string;\n retry?: number;\n}\n\nexport type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {\n stream: AsyncGenerator<\n TData extends Record<string, unknown> ? TData[keyof TData] : TData,\n TReturn,\n TNext\n >;\n};\n\nexport function createSseClient<TData = unknown>({\n onRequest,\n onSseError,\n onSseEvent,\n responseTransformer,\n responseValidator,\n sseDefaultRetryDelay,\n sseMaxRetryAttempts,\n sseMaxRetryDelay,\n sseSleepFn,\n url,\n ...options\n}: ServerSentEventsOptions): ServerSentEventsResult<TData> {\n let lastEventId: string | undefined;\n\n const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms)));\n\n const createStream = async function* () {\n let retryDelay: number = sseDefaultRetryDelay ?? 3000;\n let attempt = 0;\n const signal = options.signal ?? new AbortController().signal;\n\n while (true) {\n if (signal.aborted) break;\n\n attempt++;\n\n const headers =\n options.headers instanceof Headers\n ? options.headers\n : new Headers(options.headers as Record<string, string> | undefined);\n\n if (lastEventId !== undefined) {\n headers.set('Last-Event-ID', lastEventId);\n }\n\n try {\n const requestInit: RequestInit = {\n redirect: 'follow',\n ...options,\n body: options.serializedBody,\n headers,\n signal,\n };\n let request = new Request(url, requestInit);\n if (onRequest) {\n request = await onRequest(url, requestInit);\n }\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = options.fetch ?? globalThis.fetch;\n const response = await _fetch(request);\n\n if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);\n\n if (!response.body) throw new Error('No body in SSE response');\n\n const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();\n\n let buffer = '';\n\n const abortHandler = () => {\n try {\n reader.cancel();\n } catch {\n // noop\n }\n };\n\n signal.addEventListener('abort', abortHandler);\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n buffer += value;\n buffer = buffer.replace(/\\r\\n?/g, '\\n'); // normalize line endings\n\n const chunks = buffer.split('\\n\\n');\n buffer = chunks.pop() ?? '';\n\n for (const chunk of chunks) {\n const lines = chunk.split('\\n');\n const dataLines: Array<string> = [];\n let eventName: string | undefined;\n\n for (const line of lines) {\n if (line.startsWith('data:')) {\n dataLines.push(line.replace(/^data:\\s*/, ''));\n } else if (line.startsWith('event:')) {\n eventName = line.replace(/^event:\\s*/, '');\n } else if (line.startsWith('id:')) {\n lastEventId = line.replace(/^id:\\s*/, '');\n } else if (line.startsWith('retry:')) {\n const parsed = Number.parseInt(line.replace(/^retry:\\s*/, ''), 10);\n if (!Number.isNaN(parsed)) {\n retryDelay = parsed;\n }\n }\n }\n\n let data: unknown;\n let parsedJson = false;\n\n if (dataLines.length) {\n const rawData = dataLines.join('\\n');\n try {\n data = JSON.parse(rawData);\n parsedJson = true;\n } catch {\n data = rawData;\n }\n }\n\n if (parsedJson) {\n if (responseValidator) {\n await responseValidator(data);\n }\n\n if (responseTransformer) {\n data = await responseTransformer(data);\n }\n }\n\n onSseEvent?.({\n data,\n event: eventName,\n id: lastEventId,\n retry: retryDelay,\n });\n\n if (dataLines.length) {\n yield data as any;\n }\n }\n }\n } finally {\n signal.removeEventListener('abort', abortHandler);\n reader.releaseLock();\n }\n\n break; // exit loop on normal completion\n } catch (error) {\n // connection failed or aborted; retry after delay\n onSseError?.(error);\n\n if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {\n break; // stop after firing error\n }\n\n // exponential backoff: double retry each attempt, cap at 30s\n const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);\n await sleep(backoff);\n }\n }\n };\n\n const stream = createStream();\n\n return { stream };\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\ninterface SerializeOptions<T> extends SerializePrimitiveOptions, SerializerOptions<T> {}\n\ninterface SerializePrimitiveOptions {\n allowReserved?: boolean;\n name: string;\n}\n\nexport interface SerializerOptions<T> {\n /**\n * @default true\n */\n explode: boolean;\n style: T;\n}\n\nexport type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectStyle = 'form' | 'deepObject';\ntype ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\n\ninterface SerializePrimitiveParam extends SerializePrimitiveOptions {\n value: string;\n}\n\nexport const separatorArrayExplode = (style: ArraySeparatorStyle): '.' | ';' | ',' | '&' => {\n switch (style) {\n case 'label':\n return '.';\n case 'matrix':\n return ';';\n case 'simple':\n return ',';\n default:\n return '&';\n }\n};\n\nexport const separatorArrayNoExplode = (style: ArraySeparatorStyle): ',' | '|' | '%20' => {\n switch (style) {\n case 'form':\n return ',';\n case 'pipeDelimited':\n return '|';\n case 'spaceDelimited':\n return '%20';\n default:\n return ',';\n }\n};\n\nexport const separatorObjectExplode = (style: ObjectSeparatorStyle): '.' | ';' | ',' | '&' => {\n switch (style) {\n case 'label':\n return '.';\n case 'matrix':\n return ';';\n case 'simple':\n return ',';\n default:\n return '&';\n }\n};\n\nexport const serializeArrayParam = ({\n allowReserved,\n explode,\n name,\n style,\n value,\n}: SerializeOptions<ArraySeparatorStyle> & {\n value: unknown[];\n}): string => {\n if (!explode) {\n const joinedValues = (\n allowReserved ? value : value.map((v) => encodeURIComponent(v as string))\n ).join(separatorArrayNoExplode(style));\n switch (style) {\n case 'label':\n return `.${joinedValues}`;\n case 'matrix':\n return `;${name}=${joinedValues}`;\n case 'simple':\n return joinedValues;\n default:\n return `${name}=${joinedValues}`;\n }\n }\n\n const separator = separatorArrayExplode(style);\n const joinedValues = value\n .map((v) => {\n if (style === 'label' || style === 'simple') {\n return allowReserved ? v : encodeURIComponent(v as string);\n }\n\n return serializePrimitiveParam({\n allowReserved,\n name,\n value: v as string,\n });\n })\n .join(separator);\n return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;\n};\n\nexport const serializePrimitiveParam = ({\n allowReserved,\n name,\n value,\n}: SerializePrimitiveParam): string => {\n if (value === undefined || value === null) {\n return '';\n }\n\n if (typeof value === 'object') {\n throw new Error(\n 'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.',\n );\n }\n\n return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;\n};\n\nexport const serializeObjectParam = ({\n allowReserved,\n explode,\n name,\n style,\n value,\n valueOnly,\n}: SerializeOptions<ObjectSeparatorStyle> & {\n value: Record<string, unknown> | Date;\n valueOnly?: boolean;\n}): string => {\n if (value instanceof Date) {\n return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;\n }\n\n if (style !== 'deepObject' && !explode) {\n let values: string[] = [];\n Object.entries(value).forEach(([key, v]) => {\n values = [...values, key, allowReserved ? (v as string) : encodeURIComponent(v as string)];\n });\n const joinedValues = values.join(',');\n switch (style) {\n case 'form':\n return `${name}=${joinedValues}`;\n case 'label':\n return `.${joinedValues}`;\n case 'matrix':\n return `;${name}=${joinedValues}`;\n default:\n return joinedValues;\n }\n }\n\n const separator = separatorObjectExplode(style);\n const joinedValues = Object.entries(value)\n .map(([key, v]) =>\n serializePrimitiveParam({\n allowReserved,\n name: style === 'deepObject' ? `${name}[${key}]` : key,\n value: v as string,\n }),\n )\n .join(separator);\n return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen';\nimport {\n type ArraySeparatorStyle,\n serializeArrayParam,\n serializeObjectParam,\n serializePrimitiveParam,\n} from './pathSerializer.gen';\n\nexport interface PathSerializer {\n path: Record<string, unknown>;\n url: string;\n}\n\nexport const PATH_PARAM_RE: RegExp = /\\{[^{}]+\\}/g;\n\nexport const defaultPathSerializer = ({ path, url: _url }: PathSerializer): string => {\n let url = _url;\n const matches = _url.match(PATH_PARAM_RE);\n if (matches) {\n for (const match of matches) {\n let explode = false;\n let name = match.substring(1, match.length - 1);\n let style: ArraySeparatorStyle = 'simple';\n\n if (name.endsWith('*')) {\n explode = true;\n name = name.substring(0, name.length - 1);\n }\n\n if (name.startsWith('.')) {\n name = name.substring(1);\n style = 'label';\n } else if (name.startsWith(';')) {\n name = name.substring(1);\n style = 'matrix';\n }\n\n const value = path[name];\n\n if (value === undefined || value === null) {\n continue;\n }\n\n if (Array.isArray(value)) {\n url = url.replace(match, serializeArrayParam({ explode, name, style, value }));\n continue;\n }\n\n if (typeof value === 'object') {\n url = url.replace(\n match,\n serializeObjectParam({\n explode,\n name,\n style,\n value: value as Record<string, unknown>,\n valueOnly: true,\n }),\n );\n continue;\n }\n\n if (style === 'matrix') {\n url = url.replace(\n match,\n `;${serializePrimitiveParam({\n name,\n value: value as string,\n })}`,\n );\n continue;\n }\n\n const replaceValue = encodeURIComponent(\n style === 'label' ? `.${value as string}` : (value as string),\n );\n url = url.replace(match, replaceValue);\n }\n }\n return url;\n};\n\nexport const getUrl = ({\n baseUrl,\n path,\n query,\n querySerializer,\n url: _url,\n}: {\n baseUrl?: string;\n path?: Record<string, unknown>;\n query?: Record<string, unknown>;\n querySerializer: QuerySerializer;\n url: string;\n}): string => {\n const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;\n let url = (baseUrl ?? '') + pathUrl;\n if (path) {\n url = defaultPathSerializer({ path, url });\n }\n let search = query ? querySerializer(query) : '';\n if (search.startsWith('?')) {\n search = search.substring(1);\n }\n if (search) {\n url += `?${search}`;\n }\n return url;\n};\n\nexport function getValidRequestBody(options: {\n body?: unknown;\n bodySerializer?: BodySerializer | null;\n serializedBody?: unknown;\n}): unknown {\n const hasBody = options.body !== undefined;\n const isSerializedBody = hasBody && options.bodySerializer;\n\n if (isSerializedBody) {\n if ('serializedBody' in options) {\n const hasSerializedBody =\n options.serializedBody !== undefined && options.serializedBody !== '';\n\n return hasSerializedBody ? options.serializedBody : null;\n }\n\n // not all clients implement a serializedBody property (i.e., client-axios)\n return options.body !== '' ? options.body : null;\n }\n\n // plain/text body\n if (hasBody) {\n return options.body;\n }\n\n // no body was provided\n return undefined;\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nexport type AuthToken = string | undefined;\n\nexport interface Auth {\n /**\n * Which part of the request do we use to send the auth?\n *\n * @default 'header'\n */\n in?: 'header' | 'query' | 'cookie';\n /**\n * A unique identifier for the security scheme.\n *\n * Defined only when there are multiple security schemes whose `Auth`\n * shape would otherwise be identical.\n */\n key?: string;\n /**\n * Header or query parameter name.\n *\n * @default 'Authorization'\n */\n name?: string;\n scheme?: 'basic' | 'bearer';\n type: 'apiKey' | 'http';\n}\n\nexport const getAuthToken = async (\n auth: Auth,\n callback: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken,\n): Promise<string | undefined> => {\n const token = typeof callback === 'function' ? await callback(auth) : callback;\n\n if (!token) {\n return;\n }\n\n if (auth.scheme === 'bearer') {\n return `Bearer ${token}`;\n }\n\n if (auth.scheme === 'basic') {\n return `Basic ${btoa(token)}`;\n }\n\n return token;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n serializeArrayParam,\n serializeObjectParam,\n serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport { getUrl } from '../core/utils.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\nexport const createQuerySerializer = <T = unknown>({\n parameters = {},\n ...args\n}: QuerySerializerOptions = {}): ((queryParams: T) => string) => {\n const querySerializer = (queryParams: T): string => {\n const search: string[] = [];\n if (queryParams && typeof queryParams === 'object') {\n for (const name in queryParams) {\n const value = queryParams[name];\n\n if (value === undefined || value === null) {\n continue;\n }\n\n const options = parameters[name] || args;\n\n if (Array.isArray(value)) {\n const serializedArray = serializeArrayParam({\n allowReserved: options.allowReserved,\n explode: true,\n name,\n style: 'form',\n value,\n ...options.array,\n });\n if (serializedArray) search.push(serializedArray);\n } else if (typeof value === 'object') {\n const serializedObject = serializeObjectParam({\n allowReserved: options.allowReserved,\n explode: true,\n name,\n style: 'deepObject',\n value: value as Record<string, unknown>,\n ...options.object,\n });\n if (serializedObject) search.push(serializedObject);\n } else {\n const serializedPrimitive = serializePrimitiveParam({\n allowReserved: options.allowReserved,\n name,\n value: value as string,\n });\n if (serializedPrimitive) search.push(serializedPrimitive);\n }\n }\n }\n return search.join('&');\n };\n return querySerializer;\n};\n\n/**\n * Infers parseAs value from provided Content-Type header.\n */\nexport const getParseAs = (contentType: string | null): Exclude<Config['parseAs'], 'auto'> => {\n if (!contentType) {\n // If no Content-Type header is provided, the best we can do is return the raw response body,\n // which is effectively the same as the 'stream' option.\n return 'stream';\n }\n\n const cleanContent = contentType.split(';')[0]?.trim();\n\n if (!cleanContent) {\n return;\n }\n\n if (cleanContent.startsWith('application/json') || cleanContent.endsWith('+json')) {\n return 'json';\n }\n\n if (cleanContent === 'multipart/form-data') {\n return 'formData';\n }\n\n if (\n ['application/', 'audio/', 'image/', 'video/'].some((type) => cleanContent.startsWith(type))\n ) {\n return 'blob';\n }\n\n if (cleanContent.startsWith('text/')) {\n return 'text';\n }\n\n return;\n};\n\nconst checkForExistence = (\n options: Pick<RequestOptions, 'auth' | 'query'> & {\n headers: Headers;\n },\n name?: string,\n): boolean => {\n if (!name) {\n return false;\n }\n if (\n options.headers.has(name) ||\n options.query?.[name] ||\n options.headers.get('Cookie')?.includes(`${name}=`)\n ) {\n return true;\n }\n return false;\n};\n\nexport async function setAuthParams(\n options: Pick<RequestOptions, 'auth' | 'query' | 'security'> & {\n headers: Headers;\n },\n): Promise<void> {\n for (const auth of options.security ?? []) {\n if (checkForExistence(options, auth.name)) {\n continue;\n }\n\n const token = await getAuthToken(auth, options.auth);\n\n if (!token) {\n continue;\n }\n\n const name = auth.name ?? 'Authorization';\n\n switch (auth.in) {\n case 'query':\n if (!options.query) {\n options.query = {};\n }\n options.query[name] = token;\n break;\n case 'cookie':\n options.headers.append('Cookie', `${name}=${token}`);\n break;\n case 'header':\n default:\n options.headers.set(name, token);\n break;\n }\n }\n}\n\nexport const buildUrl: Client['buildUrl'] = (options) =>\n getUrl({\n baseUrl: options.baseUrl as string,\n path: options.path,\n query: options.query,\n querySerializer:\n typeof options.querySerializer === 'function'\n ? options.querySerializer\n : createQuerySerializer(options.querySerializer),\n url: options.url,\n });\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n const config = { ...a, ...b };\n if (config.baseUrl?.endsWith('/')) {\n config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);\n }\n config.headers = mergeHeaders(a.headers, b.headers);\n return config;\n};\n\nconst headersEntries = (headers: Headers): Array<[string, string]> => {\n const entries: Array<[string, string]> = [];\n headers.forEach((value, key) => {\n entries.push([key, value]);\n });\n return entries;\n};\n\nexport const mergeHeaders = (\n ...headers: Array<Required<Config>['headers'] | undefined>\n): Headers => {\n const mergedHeaders = new Headers();\n for (const header of headers) {\n if (!header) {\n continue;\n }\n\n const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);\n\n for (const [key, value] of iterator) {\n if (value === null) {\n mergedHeaders.delete(key);\n } else if (Array.isArray(value)) {\n for (const v of value) {\n mergedHeaders.append(key, v as string);\n }\n } else if (value !== undefined) {\n // assume object headers are meant to be JSON stringified, i.e., their\n // content value in OpenAPI specification is 'application/json'\n mergedHeaders.set(\n key,\n typeof value === 'object' ? JSON.stringify(value) : (value as string),\n );\n }\n }\n }\n return mergedHeaders;\n};\n\ntype ErrInterceptor<Err, Res, Req, Options> = (\n error: Err,\n /** response may be undefined due to a network error where no response object is produced */\n response: Res | undefined,\n /** request may be undefined, because error may be from building the request object itself */\n request: Req | undefined,\n options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;\n\ntype ResInterceptor<Res, Req, Options> = (\n response: Res,\n request: Req,\n options: Options,\n) => Res | Promise<Res>;\n\nclass Interceptors<Interceptor> {\n fns: Array<Interceptor | null> = [];\n\n clear(): void {\n this.fns = [];\n }\n\n eject(id: number | Interceptor): void {\n const index = this.getInterceptorIndex(id);\n if (this.fns[index]) {\n this.fns[index] = null;\n }\n }\n\n exists(id: number | Interceptor): boolean {\n const index = this.getInterceptorIndex(id);\n return Boolean(this.fns[index]);\n }\n\n getInterceptorIndex(id: number | Interceptor): number {\n if (typeof id === 'number') {\n return this.fns[id] ? id : -1;\n }\n return this.fns.indexOf(id);\n }\n\n update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false {\n const index = this.getInterceptorIndex(id);\n if (this.fns[index]) {\n this.fns[index] = fn;\n return id;\n }\n return false;\n }\n\n use(fn: Interceptor): number {\n this.fns.push(fn);\n return this.fns.length - 1;\n }\n}\n\nexport interface Middleware<Req, Res, Err, Options> {\n error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;\n request: Interceptors<ReqInterceptor<Req, Options>>;\n response: Interceptors<ResInterceptor<Res, Req, Options>>;\n}\n\nexport const createInterceptors = <Req, Res, Err, Options>(): Middleware<\n Req,\n Res,\n Err,\n Options\n> => ({\n error: new Interceptors<ErrInterceptor<Err, Res, Req, Options>>(),\n request: new Interceptors<ReqInterceptor<Req, Options>>(),\n response: new Interceptors<ResInterceptor<Res, Req, Options>>(),\n});\n\nconst defaultQuerySerializer = createQuerySerializer({\n allowReserved: false,\n array: {\n explode: true,\n style: 'form',\n },\n object: {\n explode: true,\n style: 'deepObject',\n },\n});\n\nconst defaultHeaders = {\n 'Content-Type': 'application/json',\n};\n\nexport const createConfig = <T extends ClientOptions = ClientOptions>(\n override: Config<Omit<ClientOptions, keyof T> & T> = {},\n): Config<Omit<ClientOptions, keyof T> & T> => ({\n ...jsonBodySerializer,\n headers: defaultHeaders,\n parseAs: 'auto',\n querySerializer: defaultQuerySerializer,\n ...override,\n});\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen';\nimport {\n buildUrl,\n createConfig,\n createInterceptors,\n getParseAs,\n mergeConfigs,\n mergeHeaders,\n setAuthParams,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n body?: any;\n headers: ReturnType<typeof mergeHeaders>;\n};\n\nexport const createClient = (config: Config = {}): Client => {\n let _config = mergeConfigs(createConfig(), config);\n\n const getConfig = (): Config => ({ ..._config });\n\n const setConfig = (config: Config): Config => {\n _config = mergeConfigs(_config, config);\n return getConfig();\n };\n\n const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();\n\n const beforeRequest = async <\n TData = unknown,\n TResponseStyle extends 'data' | 'fields' = 'fields',\n ThrowOnError extends boolean = boolean,\n Url extends string = string,\n >(\n options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,\n ) => {\n const opts = {\n ..._config,\n ...options,\n fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n headers: mergeHeaders(_config.headers, options.headers),\n serializedBody: undefined as string | undefined,\n };\n\n if (opts.security) {\n await setAuthParams(opts);\n }\n\n if (opts.requestValidator) {\n await opts.requestValidator(opts);\n }\n\n if (opts.body !== undefined && opts.bodySerializer) {\n opts.serializedBody = opts.bodySerializer(opts.body) as string | undefined;\n }\n\n // remove Content-Type header if body is empty to avoid sending invalid requests\n if (opts.body === undefined || opts.serializedBody === '') {\n opts.headers.delete('Content-Type');\n }\n\n const resolvedOpts = opts as typeof opts &\n ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>;\n const url = buildUrl(resolvedOpts);\n\n return { opts: resolvedOpts, url };\n };\n\n const request: Client['request'] = async (options) => {\n const throwOnError = options.throwOnError ?? _config.throwOnError;\n const responseStyle = options.responseStyle ?? _config.responseStyle;\n\n let request: Request | undefined;\n let response: Response | undefined;\n\n try {\n const { opts, url } = await beforeRequest(options);\n const requestInit: ReqInit = {\n redirect: 'follow',\n ...opts,\n body: getValidRequestBody(opts),\n };\n\n request = new Request(url, requestInit);\n\n for (const fn of interceptors.request.fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = opts.fetch!;\n\n response = await _fetch(request);\n\n for (const fn of interceptors.response.fns) {\n if (fn) {\n response = await fn(response, request, opts);\n }\n }\n\n const result = {\n request,\n response,\n };\n\n if (response.ok) {\n const parseAs =\n (opts.parseAs === 'auto'\n ? getParseAs(response.headers.get('Content-Type'))\n : opts.parseAs) ?? 'json';\n\n if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n let emptyData: any;\n switch (parseAs) {\n case 'arrayBuffer':\n case 'blob':\n case 'text':\n emptyData = await response[parseAs]();\n break;\n case 'formData':\n emptyData = new FormData();\n break;\n case 'stream':\n emptyData = response.body;\n break;\n case 'json':\n default:\n emptyData = {};\n break;\n }\n return opts.responseStyle === 'data'\n ? emptyData\n : {\n data: emptyData,\n ...result,\n };\n }\n\n let data: any;\n switch (parseAs) {\n case 'arrayBuffer':\n case 'blob':\n case 'formData':\n case 'text':\n data = await response[parseAs]();\n break;\n case 'json': {\n // Some servers return 200 with no Content-Length and empty body.\n // response.json() would throw; read as text and parse if non-empty.\n const text = await response.text();\n data = text ? JSON.parse(text) : {};\n break;\n }\n case 'stream':\n return opts.responseStyle === 'data'\n ? response.body\n : {\n data: response.body,\n ...result,\n };\n }\n\n if (parseAs === 'json') {\n if (opts.responseValidator) {\n await opts.responseValidator(data);\n }\n\n if (opts.responseTransformer) {\n data = await opts.responseTransformer(data);\n }\n }\n\n return opts.responseStyle === 'data'\n ? data\n : {\n data,\n ...result,\n };\n }\n\n const textError = await response.text();\n let jsonError: unknown;\n\n try {\n jsonError = JSON.parse(textError);\n } catch {\n // noop\n }\n\n throw jsonError ?? textError;\n } catch (error) {\n let finalError = error;\n\n for (const fn of interceptors.error.fns) {\n if (fn) {\n finalError = await fn(finalError, response, request, options as ResolvedRequestOptions);\n }\n }\n\n finalError = finalError || {};\n\n if (throwOnError) {\n throw finalError;\n }\n\n // TODO: we probably want to return error and improve types\n return responseStyle === 'data'\n ? undefined\n : {\n error: finalError,\n request,\n response,\n };\n }\n };\n\n const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n request({ ...options, method });\n\n const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n const { opts, url } = await beforeRequest(options);\n return createSseClient({\n ...opts,\n body: opts.body as BodyInit | null | undefined,\n method,\n onRequest: async (url, init) => {\n let request = new Request(url, init);\n for (const fn of interceptors.request.fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n return request;\n },\n serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n url,\n });\n };\n\n const _buildUrl: Client['buildUrl'] = (options) => buildUrl({ ..._config, ...options });\n\n return {\n buildUrl: _buildUrl,\n connect: makeMethodFn('CONNECT'),\n delete: makeMethodFn('DELETE'),\n get: makeMethodFn('GET'),\n getConfig,\n head: makeMethodFn('HEAD'),\n interceptors,\n options: makeMethodFn('OPTIONS'),\n patch: makeMethodFn('PATCH'),\n post: makeMethodFn('POST'),\n put: makeMethodFn('PUT'),\n request,\n setConfig,\n sse: {\n connect: makeSseFn('CONNECT'),\n delete: makeSseFn('DELETE'),\n get: makeSseFn('GET'),\n head: makeSseFn('HEAD'),\n options: makeSseFn('OPTIONS'),\n patch: makeSseFn('PATCH'),\n post: makeSseFn('POST'),\n put: makeSseFn('PUT'),\n trace: makeSseFn('TRACE'),\n },\n trace: makeMethodFn('TRACE'),\n } as Client;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { CreateAlertData, CreateAlertErrors, CreateAlertResponses, CreateApiKeyData, CreateApiKeyErrors, CreateApiKeyResponses, CreateChannelData, CreateChannelErrors, CreateChannelResponses, CreateKeywordData, CreateKeywordErrors, CreateKeywordResponses, CreateSegmentData, CreateSegmentErrors, CreateSegmentResponses, DeleteAlertData, DeleteAlertErrors, DeleteAlertResponses, DeleteChannelData, DeleteChannelErrors, DeleteChannelResponses, DeleteKeywordData, DeleteKeywordErrors, DeleteKeywordResponses, DeleteSegmentData, DeleteSegmentErrors, DeleteSegmentResponses, ExportMentionsCsvData, ExportMentionsCsvErrors, ExportMentionsCsvResponses, ExportPeopleCsvData, ExportPeopleCsvErrors, ExportPeopleCsvResponses, GetAlertData, GetAlertErrors, GetAlertResponses, GetAnalyticsBreakdownData, GetAnalyticsBreakdownErrors, GetAnalyticsBreakdownResponses, GetAnalyticsSeriesData, GetAnalyticsSeriesErrors, GetAnalyticsSeriesResponses, GetAnalyticsSummaryData, GetAnalyticsSummaryErrors, GetAnalyticsSummaryResponses, GetChannelData, GetChannelErrors, GetChannelResponses, GetCompanyData, GetCompanyErrors, GetCompanyResponses, GetHealthData, GetHealthResponses, GetKeywordData, GetKeywordErrors, GetKeywordResponses, GetMentionData, GetMentionErrors, GetMentionResponses, GetPersonData, GetPersonErrors, GetPersonResponses, GetSegmentData, GetSegmentErrors, GetSegmentResponses, GetShareOfVoiceData, GetShareOfVoiceErrors, GetShareOfVoiceResponses, ListAlertsData, ListAlertsErrors, ListAlertsResponses, ListApiKeysData, ListApiKeysErrors, ListApiKeysResponses, ListChannelDeliveriesData, ListChannelDeliveriesErrors, ListChannelDeliveriesResponses, ListChannelsData, ListChannelsErrors, ListChannelsResponses, ListKeywordsData, ListKeywordsErrors, ListKeywordsResponses, ListPeopleData, ListPeopleErrors, ListPeopleResponses, ListSegmentsData, ListSegmentsErrors, ListSegmentsResponses, MergePeopleData, MergePeopleErrors, MergePeopleResponses, RevokeApiKeyData, RevokeApiKeyErrors, RevokeApiKeyResponses, RotateWebhookSecretData, RotateWebhookSecretErrors, RotateWebhookSecretResponses, RunAlertDigestData, RunAlertDigestErrors, RunAlertDigestResponses, SearchMentionsData, SearchMentionsErrors, SearchMentionsResponses, SplitPersonData, SplitPersonErrors, SplitPersonResponses, TestAlertData, TestAlertErrors, TestAlertResponses, TestChannelData, TestChannelErrors, TestChannelResponses, UpdateAlertData, UpdateAlertErrors, UpdateAlertResponses, UpdateChannelData, UpdateChannelErrors, UpdateChannelResponses, UpdateCompanyData, UpdateCompanyErrors, UpdateCompanyResponses, UpdateKeywordData, UpdateKeywordErrors, UpdateKeywordResponses, UpdateMentionData, UpdateMentionErrors, UpdateMentionResponses, UpdatePersonData, UpdatePersonErrors, UpdatePersonResponses, UpdateSegmentData, UpdateSegmentErrors, UpdateSegmentResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {\n /**\n * You can provide a client instance returned by `createClient()` instead of\n * individual options. This might be also useful if you want to implement a\n * custom client.\n */\n client?: Client;\n /**\n * You can pass arbitrary values through the `meta` object. This can be\n * used to access values that aren't defined as part of the SDK function.\n */\n meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;\n};\n\nexport const getHealth = <ThrowOnError extends boolean = false>(options?: Options<GetHealthData, ThrowOnError>): RequestResult<GetHealthResponses, unknown, ThrowOnError> => (options?.client ?? client).get<GetHealthResponses, unknown, ThrowOnError>({ url: '/v1/health', ...options });\n\n/**\n * List keywords\n *\n * Every keyword of the workspace, newest first, with its match stats and poll health.\n */\nexport const listKeywords = <ThrowOnError extends boolean = false>(options?: Options<ListKeywordsData, ThrowOnError>): RequestResult<ListKeywordsResponses, ListKeywordsErrors, ThrowOnError> => (options?.client ?? client).get<ListKeywordsResponses, ListKeywordsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords',\n ...options\n});\n\n/**\n * Track a keyword\n *\n * Start tracking a word or phrase. Matching, classification and delivery begin on the next poll. Free workspaces track 2 keywords; a subscription raises that to 500.\n */\nexport const createKeyword = <ThrowOnError extends boolean = false>(options: Options<CreateKeywordData, ThrowOnError>): RequestResult<CreateKeywordResponses, CreateKeywordErrors, ThrowOnError> => (options.client ?? client).post<CreateKeywordResponses, CreateKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a keyword\n *\n * Removes the keyword and its matches. Posts also matched by another keyword stay.\n */\nexport const deleteKeyword = <ThrowOnError extends boolean = false>(options: Options<DeleteKeywordData, ThrowOnError>): RequestResult<DeleteKeywordResponses, DeleteKeywordErrors, ThrowOnError> => (options.client ?? client).delete<DeleteKeywordResponses, DeleteKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}',\n ...options\n});\n\n/**\n * Get a keyword\n */\nexport const getKeyword = <ThrowOnError extends boolean = false>(options: Options<GetKeywordData, ThrowOnError>): RequestResult<GetKeywordResponses, GetKeywordErrors, ThrowOnError> => (options.client ?? client).get<GetKeywordResponses, GetKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}',\n ...options\n});\n\n/**\n * Update a keyword\n *\n * Mute or unmute it, or change the platforms it is tracked on.\n */\nexport const updateKeyword = <ThrowOnError extends boolean = false>(options: Options<UpdateKeywordData, ThrowOnError>): RequestResult<UpdateKeywordResponses, UpdateKeywordErrors, ThrowOnError> => (options.client ?? client).patch<UpdateKeywordResponses, UpdateKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Get a mention\n *\n * One mention by id, as it appears in the list: the post, its author with reach and your tags, the classification, the priority score and the triage fields. Ids belong to your organization; any other id is a 404.\n */\nexport const getMention = <ThrowOnError extends boolean = false>(options: Options<GetMentionData, ThrowOnError>): RequestResult<GetMentionResponses, GetMentionErrors, ThrowOnError> => (options.client ?? client).get<GetMentionResponses, GetMentionErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/{id}',\n ...options\n});\n\n/**\n * Update a mention\n *\n * The one write on a mention. Set status to ignored or done to handle it (open puts it back), assign it to a workspace member, snooze it out of the feed, or leave an internal note. Null clears a field; omitted fields are untouched. Delivery and billing never change.\n */\nexport const updateMention = <ThrowOnError extends boolean = false>(options: Options<UpdateMentionData, ThrowOnError>): RequestResult<UpdateMentionResponses, UpdateMentionErrors, ThrowOnError> => (options.client ?? client).patch<UpdateMentionResponses, UpdateMentionErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List mentions\n *\n * Mentions matched to your keywords, filtered and paginated. Default order is newest match first; sort=priority ranks by attention score. Page with nextCursor, passing the same filters and sort. A mention is one post matched to one keyword.\n */\nexport const searchMentions = <ThrowOnError extends boolean = false>(options?: Options<SearchMentionsData, ThrowOnError>): RequestResult<SearchMentionsResponses, SearchMentionsErrors, ThrowOnError> => (options?.client ?? client).get<SearchMentionsResponses, SearchMentionsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions',\n ...options\n});\n\n/**\n * Export mentions as CSV\n *\n * The same mentions GET /v1/mentions would list for these filters, as CSV, newest published first: id, published_at, platform, keyword, author, author_url, author_followers, relevance, sentiment, intents (pipe-separated), status, relevant, delivered, url, text (first 1,000 characters). Capped at 10,000 rows; the X-Mentions-Truncated header says when the cap cut the list.\n */\nexport const exportMentionsCsv = <ThrowOnError extends boolean = false>(options?: Options<ExportMentionsCsvData, ThrowOnError>): RequestResult<ExportMentionsCsvResponses, ExportMentionsCsvErrors, ThrowOnError> => (options?.client ?? client).get<ExportMentionsCsvResponses, ExportMentionsCsvErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/export.csv',\n ...options\n});\n\n/**\n * Export people as CSV\n *\n * The same list as GET /v1/people (segmentId included) as CSV, one row per person with their contact columns: handle, followers, email, website, company, location, tags. Capped at 5,000 people.\n */\nexport const exportPeopleCsv = <ThrowOnError extends boolean = false>(options?: Options<ExportPeopleCsvData, ThrowOnError>): RequestResult<ExportPeopleCsvResponses, ExportPeopleCsvErrors, ThrowOnError> => (options?.client ?? client).get<ExportPeopleCsvResponses, ExportPeopleCsvErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/export.csv',\n ...options\n});\n\n/**\n * List people\n *\n * The people behind your mentions: one row per person, with their accounts, reach, public profile, per-workspace stats and your annotations. Filter by platform, tag, follower range, mention counts, intents seen, keyword kinds mentioned or never mentioned, or a saved segment. Offset-paginated with a total.\n */\nexport const listPeople = <ThrowOnError extends boolean = false>(options?: Options<ListPeopleData, ThrowOnError>): RequestResult<ListPeopleResponses, ListPeopleErrors, ThrowOnError> => (options?.client ?? client).get<ListPeopleResponses, ListPeopleErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people',\n ...options\n});\n\n/**\n * Get a person\n *\n * One person as your workspace sees them. An account merged into someone resolves to that person.\n */\nexport const getPerson = <ThrowOnError extends boolean = false>(options: Options<GetPersonData, ThrowOnError>): RequestResult<GetPersonResponses, GetPersonErrors, ThrowOnError> => (options.client ?? client).get<GetPersonResponses, GetPersonErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}',\n ...options\n});\n\n/**\n * Update your annotations on a person\n *\n * Tags, notes and mute, for your workspace only. Mute hides their posts from your feed and every channel; ingest and billing never change.\n */\nexport const updatePerson = <ThrowOnError extends boolean = false>(options: Options<UpdatePersonData, ThrowOnError>): RequestResult<UpdatePersonResponses, UpdatePersonErrors, ThrowOnError> => (options.client ?? client).patch<UpdatePersonResponses, UpdatePersonErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Merge an account into a person\n *\n * Declare that this account and another person are the same human, for your workspace only. Their mentions, tags and notes combine under the person named by `into`.\n */\nexport const mergePeople = <ThrowOnError extends boolean = false>(options: Options<MergePeopleData, ThrowOnError>): RequestResult<MergePeopleResponses, MergePeopleErrors, ThrowOnError> => (options.client ?? client).post<MergePeopleResponses, MergePeopleErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}/merge',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Undo a merge\n *\n * The account becomes its own person again.\n */\nexport const splitPerson = <ThrowOnError extends boolean = false>(options: Options<SplitPersonData, ThrowOnError>): RequestResult<SplitPersonResponses, SplitPersonErrors, ThrowOnError> => (options.client ?? client).post<SplitPersonResponses, SplitPersonErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}/split',\n ...options\n});\n\n/**\n * List segments\n *\n * Your saved segments, each with the number of people in it right now (segments are evaluated on every read, never materialized), plus presets you can save as a starting point. Pass a segment id to GET /v1/people to list its members.\n */\nexport const listSegments = <ThrowOnError extends boolean = false>(options?: Options<ListSegmentsData, ThrowOnError>): RequestResult<ListSegmentsResponses, ListSegmentsErrors, ThrowOnError> => (options?.client ?? client).get<ListSegmentsResponses, ListSegmentsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments',\n ...options\n});\n\n/**\n * Create a segment\n */\nexport const createSegment = <ThrowOnError extends boolean = false>(options: Options<CreateSegmentData, ThrowOnError>): RequestResult<CreateSegmentResponses, CreateSegmentErrors, ThrowOnError> => (options.client ?? client).post<CreateSegmentResponses, CreateSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a segment\n *\n * Nobody in it is affected.\n */\nexport const deleteSegment = <ThrowOnError extends boolean = false>(options: Options<DeleteSegmentData, ThrowOnError>): RequestResult<DeleteSegmentResponses, DeleteSegmentErrors, ThrowOnError> => (options.client ?? client).delete<DeleteSegmentResponses, DeleteSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments/{id}',\n ...options\n});\n\n/**\n * Get a segment\n */\nexport const getSegment = <ThrowOnError extends boolean = false>(options: Options<GetSegmentData, ThrowOnError>): RequestResult<GetSegmentResponses, GetSegmentErrors, ThrowOnError> => (options.client ?? client).get<GetSegmentResponses, GetSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments/{id}',\n ...options\n});\n\n/**\n * Update a segment\n */\nexport const updateSegment = <ThrowOnError extends boolean = false>(options: Options<UpdateSegmentData, ThrowOnError>): RequestResult<UpdateSegmentResponses, UpdateSegmentErrors, ThrowOnError> => (options.client ?? client).patch<UpdateSegmentResponses, UpdateSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Get the company profile\n *\n * What the classifier knows about you: name, description, use cases, your own accounts, and the composed context it reads.\n */\nexport const getCompany = <ThrowOnError extends boolean = false>(options?: Options<GetCompanyData, ThrowOnError>): RequestResult<GetCompanyResponses, GetCompanyErrors, ThrowOnError> => (options?.client ?? client).get<GetCompanyResponses, GetCompanyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/company',\n ...options\n});\n\n/**\n * Update the company profile\n *\n * Changing profile fields recomposes the classifier context; setting `context` directly overrides it until the next profile edit. Relevance scores for new mentions follow at once.\n */\nexport const updateCompany = <ThrowOnError extends boolean = false>(options: Options<UpdateCompanyData, ThrowOnError>): RequestResult<UpdateCompanyResponses, UpdateCompanyErrors, ThrowOnError> => (options.client ?? client).patch<UpdateCompanyResponses, UpdateCompanyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/company',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List API keys\n */\nexport const listApiKeys = <ThrowOnError extends boolean = false>(options?: Options<ListApiKeysData, ThrowOnError>): RequestResult<ListApiKeysResponses, ListApiKeysErrors, ThrowOnError> => (options?.client ?? client).get<ListApiKeysResponses, ListApiKeysErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/api-keys',\n ...options\n});\n\n/**\n * Create an API key\n *\n * Mint a key for this workspace. The key itself is returned once; only its hash is stored.\n */\nexport const createApiKey = <ThrowOnError extends boolean = false>(options: Options<CreateApiKeyData, ThrowOnError>): RequestResult<CreateApiKeyResponses, CreateApiKeyErrors, ThrowOnError> => (options.client ?? client).post<CreateApiKeyResponses, CreateApiKeyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/api-keys',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Revoke an API key\n *\n * Takes effect at once on the API and within a few minutes on cached verifications.\n */\nexport const revokeApiKey = <ThrowOnError extends boolean = false>(options: Options<RevokeApiKeyData, ThrowOnError>): RequestResult<RevokeApiKeyResponses, RevokeApiKeyErrors, ThrowOnError> => (options.client ?? client).delete<RevokeApiKeyResponses, RevokeApiKeyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/api-keys/{id}',\n ...options\n});\n\n/**\n * Delete an alert\n */\nexport const deleteAlert = <ThrowOnError extends boolean = false>(options: Options<DeleteAlertData, ThrowOnError>): RequestResult<DeleteAlertResponses, DeleteAlertErrors, ThrowOnError> => (options.client ?? client).delete<DeleteAlertResponses, DeleteAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}',\n ...options\n});\n\n/**\n * Get an alert\n */\nexport const getAlert = <ThrowOnError extends boolean = false>(options: Options<GetAlertData, ThrowOnError>): RequestResult<GetAlertResponses, GetAlertErrors, ThrowOnError> => (options.client ?? client).get<GetAlertResponses, GetAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}',\n ...options\n});\n\n/**\n * Update an alert\n */\nexport const updateAlert = <ThrowOnError extends boolean = false>(options: Options<UpdateAlertData, ThrowOnError>): RequestResult<UpdateAlertResponses, UpdateAlertErrors, ThrowOnError> => (options.client ?? client).patch<UpdateAlertResponses, UpdateAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List alerts\n */\nexport const listAlerts = <ThrowOnError extends boolean = false>(options?: Options<ListAlertsData, ThrowOnError>): RequestResult<ListAlertsResponses, ListAlertsErrors, ThrowOnError> => (options?.client ?? client).get<ListAlertsResponses, ListAlertsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts',\n ...options\n});\n\n/**\n * Create an alert\n */\nexport const createAlert = <ThrowOnError extends boolean = false>(options: Options<CreateAlertData, ThrowOnError>): RequestResult<CreateAlertResponses, CreateAlertErrors, ThrowOnError> => (options.client ?? client).post<CreateAlertResponses, CreateAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Send a test through an alert's channels\n */\nexport const testAlert = <ThrowOnError extends boolean = false>(options: Options<TestAlertData, ThrowOnError>): RequestResult<TestAlertResponses, TestAlertErrors, ThrowOnError> => (options.client ?? client).post<TestAlertResponses, TestAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}/test',\n ...options\n});\n\n/**\n * Send a digest now\n */\nexport const runAlertDigest = <ThrowOnError extends boolean = false>(options: Options<RunAlertDigestData, ThrowOnError>): RequestResult<RunAlertDigestResponses, RunAlertDigestErrors, ThrowOnError> => (options.client ?? client).post<RunAlertDigestResponses, RunAlertDigestErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}/run',\n ...options\n});\n\n/**\n * Headline counts for a window\n *\n * Matched and relevant mentions, distinct posts and people, sentiment, buying intent and questions, estimated reach, and where the matches stand in triage. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getAnalyticsSummary = <ThrowOnError extends boolean = false>(options?: Options<GetAnalyticsSummaryData, ThrowOnError>): RequestResult<GetAnalyticsSummaryResponses, GetAnalyticsSummaryErrors, ThrowOnError> => (options?.client ?? client).get<GetAnalyticsSummaryResponses, GetAnalyticsSummaryErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/summary',\n ...options\n});\n\n/**\n * Mentions over time\n *\n * Matched, relevant and sentiment counts per day or week across the window, as one total series or split per platform or per keyword with `by`. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getAnalyticsSeries = <ThrowOnError extends boolean = false>(options?: Options<GetAnalyticsSeriesData, ThrowOnError>): RequestResult<GetAnalyticsSeriesResponses, GetAnalyticsSeriesErrors, ThrowOnError> => (options?.client ?? client).get<GetAnalyticsSeriesResponses, GetAnalyticsSeriesErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/series',\n ...options\n});\n\n/**\n * Mentions grouped by one dimension\n *\n * One table of matched, relevant and sentiment counts grouped by `by`: platform, keyword, sentiment, intent, status, hour (weekday and hour of day) or person. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getAnalyticsBreakdown = <ThrowOnError extends boolean = false>(options: Options<GetAnalyticsBreakdownData, ThrowOnError>): RequestResult<GetAnalyticsBreakdownResponses, GetAnalyticsBreakdownErrors, ThrowOnError> => (options.client ?? client).get<GetAnalyticsBreakdownResponses, GetAnalyticsBreakdownErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/breakdown',\n ...options\n});\n\n/**\n * Brand against competitors\n *\n * Every keyword matched in the window with its counts and its share of brand plus competitor matches; topic keywords are counted but stay out of the split. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getShareOfVoice = <ThrowOnError extends boolean = false>(options?: Options<GetShareOfVoiceData, ThrowOnError>): RequestResult<GetShareOfVoiceResponses, GetShareOfVoiceErrors, ThrowOnError> => (options?.client ?? client).get<GetShareOfVoiceResponses, GetShareOfVoiceErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/share-of-voice',\n ...options\n});\n\n/**\n * Delete a channel\n */\nexport const deleteChannel = <ThrowOnError extends boolean = false>(options: Options<DeleteChannelData, ThrowOnError>): RequestResult<DeleteChannelResponses, DeleteChannelErrors, ThrowOnError> => (options.client ?? client).delete<DeleteChannelResponses, DeleteChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}',\n ...options\n});\n\n/**\n * Get a channel\n */\nexport const getChannel = <ThrowOnError extends boolean = false>(options: Options<GetChannelData, ThrowOnError>): RequestResult<GetChannelResponses, GetChannelErrors, ThrowOnError> => (options.client ?? client).get<GetChannelResponses, GetChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}',\n ...options\n});\n\n/**\n * Update a channel\n */\nexport const updateChannel = <ThrowOnError extends boolean = false>(options: Options<UpdateChannelData, ThrowOnError>): RequestResult<UpdateChannelResponses, UpdateChannelErrors, ThrowOnError> => (options.client ?? client).patch<UpdateChannelResponses, UpdateChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Send a test to a channel\n */\nexport const testChannel = <ThrowOnError extends boolean = false>(options: Options<TestChannelData, ThrowOnError>): RequestResult<TestChannelResponses, TestChannelErrors, ThrowOnError> => (options.client ?? client).post<TestChannelResponses, TestChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}/test',\n ...options\n});\n\n/**\n * Rotate a webhook secret\n */\nexport const rotateWebhookSecret = <ThrowOnError extends boolean = false>(options: Options<RotateWebhookSecretData, ThrowOnError>): RequestResult<RotateWebhookSecretResponses, RotateWebhookSecretErrors, ThrowOnError> => (options.client ?? client).post<RotateWebhookSecretResponses, RotateWebhookSecretErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}/rotate-secret',\n ...options\n});\n\n/**\n * List deliveries to a channel\n */\nexport const listChannelDeliveries = <ThrowOnError extends boolean = false>(options: Options<ListChannelDeliveriesData, ThrowOnError>): RequestResult<ListChannelDeliveriesResponses, ListChannelDeliveriesErrors, ThrowOnError> => (options.client ?? client).get<ListChannelDeliveriesResponses, ListChannelDeliveriesErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}/deliveries',\n ...options\n});\n\n/**\n * List channels\n */\nexport const listChannels = <ThrowOnError extends boolean = false>(options?: Options<ListChannelsData, ThrowOnError>): RequestResult<ListChannelsResponses, ListChannelsErrors, ThrowOnError> => (options?.client ?? client).get<ListChannelsResponses, ListChannelsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels',\n ...options\n});\n\n/**\n * Create a channel\n */\nexport const createChannel = <ThrowOnError extends boolean = false>(options: Options<CreateChannelData, ThrowOnError>): RequestResult<CreateChannelResponses, CreateChannelErrors, ThrowOnError> => (options.client ?? client).post<CreateChannelResponses, CreateChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, type ClientOptions, type Config, createClient, createConfig } from './client';\nimport type { ClientOptions as ClientOptions2 } from './types.gen';\n\n/**\n * The `createClientConfig()` function will be called on client initialization\n * and the returned object will become the client's initial configuration.\n *\n * You may want to initialize your client this way instead of calling\n * `setConfig()`. This is useful for example if you're using Next.js\n * to ensure your client always has the correct values.\n */\nexport type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;\n\nexport const client: Client = createClient(createConfig<ClientOptions2>({ baseUrl: 'https://api.mentio.dev' }));\n","/**\n * @mentio-dev/sdk: a typed client for the Mentio API. Everything under\n * ./generated comes from the API's OpenAPI document (`pnpm generate`), one\n * function per operation; this file adds the constructor that binds a key\n * and a host once so calls read `mentio.searchMentions({ query })`.\n */\nimport { createClient, createConfig, type Client } from './generated/client';\nimport * as sdk from './generated/sdk.gen';\n\nexport * from './generated';\nexport { createClient, createConfig } from './generated/client';\nexport type { Client, Config, RequestResult } from './generated/client';\n\nexport const DEFAULT_BASE_URL = 'https://api.mentio.dev';\n\nexport interface MentioOptions {\n /** API key from the dashboard or POST /v1/api-keys (mk_live_...). */\n apiKey: string;\n /** Another deployment's host; the hosted API by default. */\n baseUrl?: string;\n /** Custom fetch, for tests or runtimes without a global one. */\n fetch?: typeof fetch;\n /** Extra headers sent on every request. */\n headers?: Record<string, string>;\n}\n\n/** Every SDK function, pre-bound to one client, plus the client itself for\n * interceptors and raw requests. Passing `client` in a call still wins. */\nexport type Mentio = typeof sdk & { client: Client };\n\nexport function createMentio(options: MentioOptions): Mentio {\n const client = createClient(\n createConfig({\n baseUrl: (options.baseUrl ?? DEFAULT_BASE_URL).replace(/\\/+$/, ''),\n auth: () => options.apiKey,\n ...(options.fetch ? { fetch: options.fetch } : {}),\n ...(options.headers ? { headers: options.headers } : {}),\n }),\n );\n const bound: Record<string, unknown> = {};\n for (const [name, fn] of Object.entries(sdk)) {\n if (typeof fn !== 'function') continue;\n const call = fn as (callOptions?: { client?: Client }) => unknown;\n bound[name] = (callOptions?: { client?: Client }) => call({ ...callOptions, client: callOptions?.client ?? client });\n }\n return { ...(bound as typeof sdk), client };\n}\n","/**\n * One generic request runner for every generated command: the operation\n * table says method, path and response kind; flags.ts already turned the\n * command line into path, query and body. No per-endpoint code.\n */\nimport { createMentio, type Client } from '@mentio-dev/sdk';\nimport type { BuiltRequest } from './flags';\nimport type { CliOperation } from './operations-types';\nimport type { Settings } from './config';\n\nexport interface RunOutcome {\n ok: boolean;\n status: number;\n /** The parsed body: JSON, CSV text, or undefined for 204. */\n value: unknown;\n}\n\nexport function clientFor(settings: Settings, fetchImpl?: typeof fetch): Client {\n return createMentio({ apiKey: settings.apiKey ?? '', baseUrl: settings.apiUrl, ...(fetchImpl ? { fetch: fetchImpl } : {}) }).client;\n}\n\ntype Method = 'GET' | 'POST' | 'PATCH' | 'DELETE' | 'PUT';\n\n/** The generated SDK functions carry this per call; raw client.request calls must too, or the key is never sent. */\nexport const BEARER = [{ scheme: 'bearer', type: 'http' }] as const;\n\nexport async function runOperation(client: Client, op: CliOperation, request: BuiltRequest): Promise<RunOutcome> {\n const result = await client.request({\n method: op.method as Method,\n url: op.path,\n path: request.path,\n query: request.query,\n ...(request.body !== undefined ? { body: request.body } : {}),\n parseAs: op.response === 'csv' ? 'text' : 'auto',\n security: BEARER,\n throwOnError: false,\n });\n const status = result.response?.status ?? 0;\n if (result.error !== undefined) return { ok: false, status, value: result.error };\n if (!result.response) return { ok: false, status, value: undefined };\n // A 204 parses to null; the CLI prints its own { ok, status } for those.\n return { ok: result.response.ok, status, value: result.data ?? undefined };\n}\n\n/** The API's error envelope when there is one, else something shaped like it. */\nexport function errorEnvelope(outcome: RunOutcome): { error: { code: string; message: string } } {\n const value = outcome.value;\n if (value !== null && typeof value === 'object' && 'error' in value) {\n const inner = (value as { error: unknown }).error;\n if (inner !== null && typeof inner === 'object' && 'code' in inner && 'message' in inner) {\n return value as { error: { code: string; message: string } };\n }\n }\n const message = typeof value === 'string' && value.trim() !== '' ? value.trim().slice(0, 300) : `Request failed with status ${outcome.status}`;\n return { error: { code: `http_${outcome.status}`, message } };\n}\n","/**\n * mentions:watch: `tail -f` for the feed. Polls the newest page on an\n * interval and prints every mention it has not printed before as one JSON\n * line, oldest first, so a shell pipeline is an alert channel. Dedup is by\n * mention id over a bounded window; the API's `since` filters by publish\n * date, which lags ingest, so it is not used for this.\n */\nimport type { Client } from '@mentio-dev/sdk';\nimport { BEARER } from './run';\n\nconst SEEN_LIMIT = 5000;\nconst PAGE = 100;\n\nexport interface Seen {\n ids: Set<string>;\n order: string[];\n}\n\nexport const newSeen = (): Seen => ({ ids: new Set(), order: [] });\n\n/** Items not seen yet, oldest first; marks them seen. */\nexport function takeNew<T extends { id: string }>(seen: Seen, newestFirst: ReadonlyArray<T>): T[] {\n const fresh: T[] = [];\n for (const item of newestFirst) {\n if (seen.ids.has(item.id)) continue;\n fresh.push(item);\n }\n for (const item of fresh) {\n seen.ids.add(item.id);\n seen.order.push(item.id);\n }\n while (seen.order.length > SEEN_LIMIT) {\n const oldest = seen.order.shift();\n if (oldest !== undefined) seen.ids.delete(oldest);\n }\n return fresh.reverse();\n}\n\nexport interface WatchOptions {\n client: Client;\n /** Search filters, already coerced (platform, keywordId, relevant, ...). */\n query: Record<string, string | number | boolean>;\n intervalMs: number;\n /** Print the current first page before following; off by default, like tail -f. */\n fromStart: boolean;\n write: (line: string) => void;\n warn: (line: string) => void;\n signal: AbortSignal;\n sleep?: (ms: number, signal: AbortSignal) => Promise<void>;\n}\n\nconst defaultSleep = (ms: number, signal: AbortSignal): Promise<void> =>\n new Promise((resolve) => {\n if (signal.aborted) return resolve();\n const timer = setTimeout(resolve, ms);\n signal.addEventListener('abort', () => {\n clearTimeout(timer);\n resolve();\n });\n });\n\nexport async function watchMentions(options: WatchOptions): Promise<void> {\n const sleep = options.sleep ?? defaultSleep;\n const seen = newSeen();\n let first = true;\n while (!options.signal.aborted) {\n const result = await options.client.request({\n method: 'GET',\n url: '/v1/mentions',\n query: { ...options.query, sort: 'newest', limit: PAGE },\n security: BEARER,\n throwOnError: false,\n });\n if (result.error !== undefined || !result.response?.ok) {\n options.warn(JSON.stringify({ error: result.error ?? { code: `http_${result.response?.status ?? 0}`, message: 'poll failed' } }));\n } else {\n const page = (result.data as { data?: Array<{ id: string }> } | undefined)?.data ?? [];\n const fresh = takeNew(seen, page);\n if (!first || options.fromStart) for (const item of fresh) options.write(JSON.stringify(item));\n }\n first = false;\n await sleep(options.intervalMs, options.signal);\n }\n}\n"],"mappings":";;;;;;;;AAOA,SAAS,SAAS,cAAc;AAChC,SAAS,iBAAAA,sBAAqB;AAC9B,SAAS,gBAAgB;;;ACTzB;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,SAAW;AAAA,EACX,UAAY;AAAA,EACZ,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EACA,MAAQ;AAAA,IACN,K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