@leadpoet/client 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +59 -35
  2. package/cli.js +47 -2
  3. package/cli.js.map +2 -2
  4. package/client.js +47 -2
  5. package/client.js.map +2 -2
  6. package/mcp.js +3969 -71
  7. package/mcp.js.map +4 -4
  8. package/package.json +13 -2
  9. package/skill/SKILL.md +83 -9
  10. package/types/scripts/leadpoet-mcp.d.ts +1 -7
  11. package/types/shared/account-monitoring.d.ts +1169 -0
  12. package/types/shared/assistant-brief.d.ts +1681 -0
  13. package/types/shared/assistant-memories.d.ts +62 -0
  14. package/types/shared/assistant-send-forecast.d.ts +442 -0
  15. package/types/shared/assistant.d.ts +238 -0
  16. package/types/shared/employee-count.d.ts +90 -0
  17. package/types/shared/gtm-context.d.ts +233 -0
  18. package/types/shared/icp-product-selection.d.ts +27 -0
  19. package/types/shared/icp-profile.d.ts +2625 -0
  20. package/types/shared/industry-taxonomy.d.ts +1 -0
  21. package/types/shared/lead-request-limits.d.ts +4 -0
  22. package/types/shared/leadpoet-client.d.ts +1315 -0
  23. package/types/shared/leadpoet-mcp-server.d.ts +39 -0
  24. package/types/shared/mcp-connect.d.ts +22 -0
  25. package/types/shared/monitor-technologies.d.ts +38 -0
  26. package/types/shared/outreach-analytics.d.ts +334 -0
  27. package/types/shared/outreach-audience-filters.d.ts +156 -0
  28. package/types/shared/outreach-audience-segments.d.ts +135 -0
  29. package/types/shared/outreach-enums.d.ts +22 -0
  30. package/types/shared/outreach-v2-contract.d.ts +253 -0
  31. package/types/shared/plan-entitlements.d.ts +75 -0
  32. package/types/shared/plan-features.d.ts +50 -0
  33. package/types/shared/request-credit-constants.d.ts +13 -0
  34. package/types/shared/website-fact-language.d.ts +9 -0
  35. package/types/shared/workspace-operations.d.ts +1975 -29
  36. package/types/shared/workspace-tool-metadata.d.ts +1083 -0
package/cli.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../scripts/leadpoet.ts", "../../shared/workspace-operations.ts", "../../shared/leadpoet-client.ts"],
4
- "sourcesContent": ["import { createReadStream, realpathSync } from \"node:fs\";\nimport { parseArgs } from \"node:util\";\nimport type { Readable } from \"node:stream\";\nimport { fileURLToPath } from \"node:url\";\nimport { LeadpoetClient, LeadpoetError, operations, type JsonObject } from \"../shared/leadpoet-client\";\nimport type { ClientOperationId } from \"../shared/workspace-operations\";\n\nconst help = `Leadpoet \u2014 Lead engine, Pipeline and Outreach\n\n leadpoet operations\n leadpoet describe <operation>\n leadpoet call <operation> [--params '{\"id\":\"...\"}'] [--query '{\"limit\":25}']\n [--input body.json | --input -] [--idempotency-key persisted-key] [--allow-send]\n leadpoet wait <request-uuid> [--timeout 300]\n\nSet LEADPOET_API_KEY and LEADPOET_API_BASE (HTTPS URL ending in /api/v1).\nOutput is JSON. Exit codes: 0 success, 1 transport/server, 2 invalid input,\n3 credentials/permission, 4 conflict, 5 rate limit, 6 pending/failed request, 130 interrupted.\nWrites are never automatically retried. Keep the same key and body on retry.\n`;\nconst parseObject = (text: string): JsonObject => {\n let value;\n try { value = JSON.parse(text); }\n catch { throw new Error(\"Invalid JSON input; provide a JSON object\"); }\n if (!value || typeof value !== \"object\" || Array.isArray(value)) throw new Error(\"Expected a JSON object\");\n return value;\n};\nexport async function readCliBody(input: Readable, signal: AbortSignal): Promise<JsonObject> {\n signal.throwIfAborted();\n const abort = () => input.destroy(signal.reason);\n signal.addEventListener(\"abort\", abort, { once: true });\n try {\n const chunks: Buffer[] = []; let size = 0;\n for await (const chunk of input) {\n const bytes = Buffer.from(chunk); size += bytes.length;\n if (size > 256 * 1024) throw new Error(\"Request body exceeds 256 KiB\");\n chunks.push(bytes);\n }\n signal.throwIfAborted();\n return parseObject(Buffer.concat(chunks).toString(\"utf8\"));\n } finally { signal.removeEventListener(\"abort\", abort); }\n}\nexport async function runCli(args: string[], io: { out: (text: string) => void; err: (text: string) => void }, env: NodeJS.ProcessEnv = process.env): Promise<number> {\n try {\n const { values, positionals } = parseArgs({ args, allowPositionals: true, strict: true, options: {\n help: { type: \"boolean\", short: \"h\" }, params: { type: \"string\" }, query: { type: \"string\" },\n input: { type: \"string\" }, \"idempotency-key\": { type: \"string\" }, \"allow-send\": { type: \"boolean\" }, timeout: { type: \"string\" },\n } });\n if (values.help || !positionals.length) { io.out(help); return 0; }\n const [command, id] = positionals;\n if (positionals.length > (command === \"operations\" ? 1 : 2)) throw new Error(\"Extra arguments are not supported; use --help\");\n const allowedOptions = command === \"call\"\n ? [\"params\", \"query\", \"input\", \"idempotency-key\", \"allow-send\"]\n : command === \"wait\" ? [\"timeout\"] : [];\n if (Object.keys(values).some(option => option !== \"help\" && !allowedOptions.includes(option))) {\n throw new Error(\"These options are not supported by this command; use --help\");\n }\n if (command === \"operations\") { io.out(JSON.stringify(operations, null, 2)); return 0; }\n if (![\"describe\", \"call\", \"wait\"].includes(command) || !id) throw new Error(\"Choose describe, call, or wait and an operation or request ID\");\n const operation = operations.find(item => item.id === id);\n if (command !== \"wait\" && !operation) throw new Error(\"Unknown operation; run leadpoet operations\");\n const client = new LeadpoetClient({ baseUrl: env.LEADPOET_API_BASE ?? \"https://leadpoet.com/api/v1\", apiKey: env.LEADPOET_API_KEY ?? \"\" });\n const controller = new AbortController();\n const abort = () => controller.abort(new DOMException(\"Interrupted; writes may have committed. Keep the original retry key.\", \"AbortError\"));\n process.once(\"SIGINT\", abort);\n try {\n if (command === \"describe\") {\n const spec = await client.openapi(controller.signal);\n const paths = spec.paths as JsonObject;\n const path = operation!.path.replace(/:([A-Za-z]+)/g, \"{$1}\");\n const contract = (paths[path] as JsonObject | undefined)?.[operation!.method];\n if (!contract) throw new Error(\"This deployment does not expose this operation\");\n io.out(JSON.stringify({ operation: contract, components: spec.components ?? {} }, null, 2)); return 0;\n }\n if (command === \"wait\") {\n const result = await client.waitForRequest(id, { timeoutMs: Number(values.timeout ?? 300) * 1000, signal: controller.signal });\n io.out(JSON.stringify(result, null, 2)); return [\"ready\", \"completed\"].includes(String(result.data.status)) ? 0 : 6;\n }\n const params = values.params ? parseObject(values.params) : undefined;\n if (params && Object.values(params).some(value => typeof value !== \"string\")) throw new Error(\"Path parameter values must be strings\");\n const query = values.query ? parseObject(values.query) : undefined;\n if (query && Object.values(query).some(value => value === null || (typeof value === \"object\" && !(Array.isArray(value) && value.every(item => typeof item === \"string\"))))) throw new Error(\"Query values must be scalars or string arrays\");\n let body: JsonObject | undefined;\n if (values.input) {\n body = await readCliBody(values.input === \"-\" ? process.stdin : createReadStream(values.input), controller.signal);\n }\n const result = await client.call(id as ClientOperationId, {\n params: params as Record<string, string> | undefined,\n query: query as Record<string, string | number | boolean | string[]> | undefined,\n body, idempotencyKey: values[\"idempotency-key\"], allowSend: values[\"allow-send\"], signal: controller.signal,\n });\n io.out(JSON.stringify(result, null, 2)); return 0;\n } finally { process.removeListener(\"SIGINT\", abort); }\n } catch (error) {\n const known = error instanceof LeadpoetError;\n const code = known ? error.code : error instanceof Error && error.name === \"TimeoutError\" ? \"timeout\" : error instanceof Error && error.name === \"AbortError\" ? \"interrupted\" : \"client_error\";\n // Native fetch errors can contain URLs and headers in their cause. Never serialize them.\n io.err(JSON.stringify({ error: { code, message: known ? error.message : error instanceof Error ? error.message : \"Request failed\", ...(known ? { status: error.status, request_id: error.requestId, details: error.details, retry_after_seconds: error.retryAfterSeconds } : {}) } }));\n if (known) return [401, 403].includes(error.status) ? 3 : error.status === 409 ? 4 : error.status === 429 ? 5 : error.status >= 500 ? 1 : 2;\n return code === \"interrupted\" ? 130 : code === \"timeout\" ? 6 : error instanceof TypeError ? 1 : 2;\n }\n}\nif (process.argv[1] && realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) {\n process.exitCode = await runCli(process.argv.slice(2), { out: text => process.stdout.write(text + \"\\n\"), err: text => process.stderr.write(text + \"\\n\") });\n}\n", "/** Explicit public surface: adding an app route never exposes it automatically. */\nexport const WORKSPACE_OPERATIONS = [\n {\"method\": \"post\", \"nativePath\": \"/api/requests\", \"path\": \"/requests\", \"id\": \"createRequest\", \"scope\": \"lead_engine:write\", \"bodyScopes\": { \"recurrence\": [\"outreach:send\"] }, \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"get\", \"nativePath\": \"/api/requests/contact-settings\", \"path\": \"/requests/contact-settings\", \"id\": \"getContactAllowance\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/queries\", \"path\": \"/requests\", \"id\": \"listRequests\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/queries/:id\", \"path\": \"/requests/:id\", \"id\": \"getRequest\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline\", \"path\": \"/pipeline\", \"id\": \"getPipeline\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/cards/:id\", \"path\": \"/pipeline/companies/:id\", \"id\": \"updateCompany\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/contact-enrichment/readiness\", \"path\": \"/pipeline/contact-enrichment/readiness\", \"id\": \"getContactReadiness\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/company-pipeline/cards/:id/contact-requests\", \"path\": \"/pipeline/companies/:id/contact-requests\", \"id\": \"requestContacts\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/contact-requests/:requestId\", \"path\": \"/pipeline/companies/:cardId/contact-requests/:requestId\", \"id\": \"getContactRequest\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/contact-requests/latest\", \"path\": \"/pipeline/companies/:cardId/contact-requests/latest\", \"id\": \"getLatestContactRequest\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/icp-profiles\", \"path\": \"/icps\", \"id\": \"listIcps\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/audiences\", \"path\": \"/icps/audiences\", \"id\": \"createIcp\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"get\", \"nativePath\": \"/api/icp-profiles/:icpId\", \"path\": \"/icps/:icpId\", \"id\": \"getIcp\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/icp-profiles/:icpId/versions\", \"path\": \"/icps/:icpId/versions\", \"id\": \"listIcpVersions\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/:icpId/draft\", \"path\": \"/icps/:icpId/draft\", \"id\": \"createIcpDraft\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/icp-profiles/:icpId/drafts/:draftId\", \"path\": \"/icps/:icpId/drafts/:draftId\", \"id\": \"updateIcpDraft\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/:icpId/drafts/:draftId/publish\", \"path\": \"/icps/:icpId/drafts/:draftId/publish\", \"id\": \"publishIcp\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/:icpId/archive\", \"path\": \"/icps/:icpId/archive\", \"id\": \"archiveIcp\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/contact-engagements\", \"path\": \"/pipeline/contacts\", \"id\": \"listPipelineContacts\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/contact-engagements/:engagementId/stage\", \"path\": \"/pipeline/contacts/:engagementId/stage\", \"id\": \"moveContact\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"body\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/contact-engagements/:engagementId/pin\", \"path\": \"/pipeline/contacts/:engagementId/pin\", \"id\": \"pinContact\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/deals\", \"path\": \"/pipeline/deals\", \"id\": \"listDeals\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/deals\", \"path\": \"/pipeline/companies/:cardId/deals\", \"id\": \"createDeal\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/deals/:dealId\", \"path\": \"/pipeline/deals/:dealId\", \"id\": \"updateDeal\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/deals/:dealId/stage\", \"path\": \"/pipeline/deals/:dealId/stage\", \"id\": \"moveDeal\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"body\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/pipeline-config\", \"path\": \"/pipeline/configuration\", \"id\": \"getPipelineConfiguration\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/notes\", \"path\": \"/pipeline/companies/:cardId/notes\", \"id\": \"listCompanyNotes\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/notes\", \"path\": \"/pipeline/companies/:cardId/notes\", \"id\": \"createCompanyNote\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"header_uuid\"},\n {\"method\": \"get\", \"nativePath\": \"/accounts\", \"path\": \"/outreach/accounts\", \"id\": \"listSendingAccounts\", \"scope\": \"outreach:read\", \"group\": \"outreach\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/conversations\", \"path\": \"/outreach/conversations\", \"id\": \"listConversations\", \"scope\": \"outreach:read\", \"group\": \"outreach\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/workspace-profile\", \"path\": \"/outreach/profile\", \"id\": \"getOutreachProfile\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"put\", \"nativePath\": \"/workspace-profile\", \"path\": \"/outreach/profile\", \"id\": \"updateOutreachProfile\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/audience-sources\", \"path\": \"/outreach/audience-sources\", \"id\": \"listAudienceSources\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/audience-contacts\", \"path\": \"/outreach/audience-contacts\", \"id\": \"listAudienceContacts\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/audience-snapshots/preview-selection\", \"path\": \"/outreach/audiences/preview\", \"id\": \"previewAudience\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"post\", \"nativePath\": \"/audience-snapshots/from-selection\", \"path\": \"/outreach/audiences\", \"id\": \"createAudience\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies\", \"path\": \"/outreach/campaigns\", \"id\": \"listCampaigns\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/campaign-product-descriptions\", \"path\": \"/outreach/campaign-product-descriptions\", \"id\": \"listCampaignProductDescriptions\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies\", \"path\": \"/outreach/campaigns\", \"id\": \"createCampaign\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id\", \"path\": \"/outreach/campaigns/:id\", \"id\": \"getCampaign\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"put\", \"nativePath\": \"/strategies/:id\", \"path\": \"/outreach/campaigns/:id\", \"id\": \"updateCampaign\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/preview\", \"path\": \"/outreach/campaigns/:id/preview\", \"id\": \"previewCampaign\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"safe\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/contract-proposal\", \"path\": \"/outreach/campaigns/:id/contract-proposal\", \"id\": \"proposeCampaignContract\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"safe\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/launch\", \"path\": \"/outreach/campaigns/:id/launch\", \"id\": \"launchCampaign\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/pause\", \"path\": \"/outreach/campaigns/:id/pause\", \"id\": \"pauseCampaign\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/resume\", \"path\": \"/outreach/campaigns/:id/resume\", \"id\": \"resumeCampaign\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/review\", \"path\": \"/outreach/review\", \"id\": \"listReview\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/review/:messageId/deny\", \"path\": \"/outreach/review/:messageId/deny\", \"id\": \"denyMessage\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/review/:messageId/skip\", \"path\": \"/outreach/review/:messageId/skip\", \"id\": \"skipMessage\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"get\", \"nativePath\": \"/replies\", \"path\": \"/outreach/replies\", \"id\": \"listReplies\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/performance/summary\", \"path\": \"/outreach/analytics\", \"id\": \"getOutreachAnalytics\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/review/prepare-approval\", \"path\": \"/outreach/review/approve\", \"id\": \"approveMessages\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/conversations/:id/reply\", \"path\": \"/outreach/conversations/:id/reply\", \"id\": \"replyToConversation\", \"scope\": \"outreach:send\", \"group\": \"outreach\", \"retry\": \"request_id\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/archive\", \"path\": \"/outreach/campaigns/:id/archive\", \"id\": \"archiveCampaign\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/\", \"path\": \"/outreach/sequence-templates\", \"id\": \"listSequenceTemplates\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/:id\", \"path\": \"/outreach/sequence-templates/:id\", \"id\": \"getSequenceTemplate\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/from-campaign/:id\", \"path\": \"/outreach/campaigns/:id/sequence\", \"id\": \"getCampaignSequence\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/\", \"path\": \"/outreach/sequence-templates\", \"id\": \"createSequenceTemplate\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"post\", \"nativePath\": \"/:id/duplicate\", \"path\": \"/outreach/sequence-templates/:id/duplicate\", \"id\": \"duplicateSequenceTemplate\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"post\", \"nativePath\": \"/:id/archive\", \"path\": \"/outreach/sequence-templates/:id/archive\", \"id\": \"archiveSequenceTemplate\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id/messaging\", \"path\": \"/outreach/campaigns/:id/messaging\", \"id\": \"getCampaignMessaging\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"put\", \"nativePath\": \"/strategies/:id/messaging\", \"path\": \"/outreach/campaigns/:id/messaging\", \"id\": \"updateCampaignMessaging\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"get\", \"nativePath\": \"/api/recurring-requests\", \"path\": \"/recurring-requests\", \"id\": \"listRecurringRequests\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/recurring-requests/options\", \"path\": \"/recurring-requests/options\", \"id\": \"getRecurringRequestOptions\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/recurring-requests\", \"path\": \"/recurring-requests\", \"id\": \"createRecurringRequest\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"operation_id\", \"additionalScopes\": [\"outreach:send\"]},\n {\"method\": \"patch\", \"nativePath\": \"/api/recurring-requests/setups/:id\", \"path\": \"/recurring-requests/setups/:id\", \"id\": \"updateRecurringSetup\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"bound\", \"additionalScopes\": [\"outreach:send\"]},\n {\"method\": \"patch\", \"nativePath\": \"/api/recurring-requests/:id\", \"path\": \"/recurring-requests/:id\", \"id\": \"updateRecurringRequest\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"bound\", \"additionalScopes\": [\"outreach:send\"]},\n {\"method\": \"get\", \"nativePath\": \"/queued\", \"path\": \"/outreach/queued\", \"id\": \"listQueuedMessages\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/queued/:messageId\", \"path\": \"/outreach/queued/:messageId\", \"id\": \"getQueuedMessage\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/queued/:messageId/outcome\", \"path\": \"/outreach/queued/:messageId/outcome\", \"id\": \"getMessageOutcome\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/queued/priority\", \"path\": \"/outreach/queued/priority\", \"id\": \"prioritizeMessages\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"request_id\"},\n {\"method\": \"post\", \"nativePath\": \"/queued/:messageId/cancel\", \"path\": \"/outreach/queued/:messageId/cancel\", \"id\": \"cancelQueuedMessage\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/queued/:messageId/return-to-review\", \"path\": \"/outreach/queued/:messageId/return-to-review\", \"id\": \"returnQueuedMessageToReview\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"get\", \"nativePath\": \"/queued/:messageId/edit-session\", \"path\": \"/outreach/queued/:messageId/edit-session\", \"id\": \"getQueuedMessageEditSession\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/queued/:messageId/resume-unchanged\", \"path\": \"/outreach/queued/:messageId/resume-unchanged\", \"id\": \"resumeQueuedMessageUnchanged\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/queued/:messageId/send-now\", \"path\": \"/outreach/queued/:messageId/send-now\", \"id\": \"sendQueuedMessageNow\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/queued/:messageId/send-sooner\", \"path\": \"/outreach/queued/:messageId/send-sooner\", \"id\": \"sendQueuedMessageSooner\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"patch\", \"nativePath\": \"/strategies/:id/name\", \"path\": \"/outreach/campaigns/:id/name\", \"id\": \"renameCampaign\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/restore\", \"path\": \"/outreach/campaigns/:id/restore\", \"id\": \"restoreCampaign\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/sender-allocations/preview\", \"path\": \"/outreach/sender-allocations/preview\", \"id\": \"previewSenderAllocations\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"safe\"},\n {\"method\": \"put\", \"nativePath\": \"/strategies/:id/sending-schedule\", \"path\": \"/outreach/campaigns/:id/sending-schedule\", \"id\": \"updateCampaignSchedule\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id/activity\", \"path\": \"/outreach/campaigns/:id/activity\", \"id\": \"getCampaignActivity\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id/decisions\", \"path\": \"/outreach/campaigns/:id/decisions\", \"id\": \"getCampaignDecisions\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id/reviews\", \"path\": \"/outreach/campaigns/:id/reviews\", \"id\": \"getCampaignReviews\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/audience-snapshots\", \"path\": \"/outreach/audiences\", \"id\": \"listAudiences\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/audience-snapshots/:id/funnel\", \"path\": \"/outreach/audiences/:id/funnel\", \"id\": \"getAudienceFunnel\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/audience-snapshots/:snapshotId/preflight\", \"path\": \"/outreach/audiences/:snapshotId/preflight\", \"id\": \"getAudiencePreflight\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/message-preview\", \"path\": \"/outreach/campaigns/:id/message-preview\", \"id\": \"previewCampaignMessage\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"safe\"},\n {\"method\": \"post\", \"nativePath\": \"/safety-attention/delivery-unknown/:messageId/check\", \"path\": \"/outreach/safety-attention/delivery-unknown/:messageId/check\", \"id\": \"checkMessageDelivery\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles\", \"path\": \"/icps\", \"id\": \"createManualIcp\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"get\", \"nativePath\": \"/api/icp-profiles/:icpId/usage\", \"path\": \"/icps/:icpId/usage\", \"id\": \"getIcpUsage\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id/description\", \"path\": \"/outreach/campaigns/:id/description\", \"id\": \"getCampaignDescription\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"put\", \"nativePath\": \"/strategies/:id/description\", \"path\": \"/outreach/campaigns/:id/description\", \"id\": \"updateCampaignDescription\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"get\", \"nativePath\": \"/performance/filters\", \"path\": \"/outreach/analytics/filters\", \"id\": \"getAnalyticsFilters\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/performance/analytics\", \"path\": \"/outreach/analytics/report\", \"id\": \"getAnalyticsReport\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/lead-engine-audience\", \"path\": \"/icps/lead-engine-audience\", \"id\": \"saveLeadEngineAudience\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/from-scan\", \"path\": \"/icps/from-scan\", \"id\": \"createIcpFromScan\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/:icpId/apply-preview\", \"path\": \"/icps/:icpId/apply-preview\", \"id\": \"previewIcpApplication\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"safe\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/:icpId/promote-overrides\", \"path\": \"/icps/:icpId/promote-overrides\", \"id\": \"promoteIcpOverrides\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/deal-summaries\", \"path\": \"/pipeline/deal-summaries\", \"id\": \"getDealSummaries\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/revenue-insights\", \"path\": \"/pipeline/revenue-insights\", \"id\": \"getRevenueInsights\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/deals\", \"path\": \"/pipeline/companies/:cardId/deals\", \"id\": \"listCompanyDeals\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/deals/:dealId/pin\", \"path\": \"/pipeline/deals/:dealId/pin\", \"id\": \"pinDeal\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/deals/:dealId/attribution\", \"path\": \"/pipeline/deals/:dealId/attribution\", \"id\": \"updateDealAttribution\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/deals/actions/bulk-stage\", \"path\": \"/pipeline/deals/actions/bulk-stage\", \"id\": \"moveDeals\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"body\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/contact-engagements/actions/bulk-stage\", \"path\": \"/pipeline/contacts/actions/bulk-stage\", \"id\": \"moveContacts\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"body\"},\n {\"method\": \"post\", \"nativePath\": \"/api/company-pipeline/contact-engagements/:engagementId/qualification-deal/undo\", \"path\": \"/pipeline/contacts/:engagementId/qualification-deal/undo\", \"id\": \"undoContactQualification\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"body\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/note-counts\", \"path\": \"/pipeline/companies/:cardId/note-counts\", \"id\": \"getCompanyNoteCounts\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/notes/clear\", \"path\": \"/pipeline/companies/:cardId/notes/archive\", \"id\": \"archiveCompanyNotes\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/audience/preview\", \"path\": \"/outreach/campaigns/:id/audience/preview\", \"id\": \"previewCampaignAudience\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"operation_id\", \"retryIdentity\": \"campaignAudience\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/audience/add\", \"path\": \"/outreach/campaigns/:id/audience/add\", \"id\": \"addCampaignAudience\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"operation_id\", \"retryIdentity\": \"campaignAudience\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id/audience/contacts\", \"path\": \"/outreach/campaigns/:id/audience/contacts\", \"id\": \"listCampaignContacts\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/audience/contacts/:enrollmentId/remove\", \"path\": \"/outreach/campaigns/:id/audience/contacts/:enrollmentId/remove\", \"id\": \"removePendingCampaignContact\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/conversations/:id/sequence\", \"path\": \"/outreach/conversations/:id/sequence\", \"id\": \"updateConversationSequence\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"put\", \"nativePath\": \"/strategies/:id/contact-cap\", \"path\": \"/outreach/campaigns/:id/contact-cap\", \"id\": \"updateCampaignContactCap\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"put\", \"nativePath\": \"/strategies/:id/sender-allocations\", \"path\": \"/outreach/campaigns/:id/sender-allocations\", \"id\": \"updateSenderAllocations\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"put\", \"nativePath\": \"/strategies/:id/sending-days\", \"path\": \"/outreach/campaigns/:id/sending-days\", \"id\": \"updateSendingDays\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/change-mode\", \"path\": \"/outreach/campaigns/:id/change-mode\", \"id\": \"changeCampaignMode\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/discard\", \"path\": \"/outreach/campaigns/:id/discard\", \"id\": \"discardCampaign\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/drafts/restore\", \"path\": \"/outreach/campaigns/:id/drafts/restore\", \"id\": \"restoreCampaignDrafts\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/safety-attention/delivery-unknown/:messageId/resolve\", \"path\": \"/outreach/safety-attention/delivery-unknown/:messageId/resolve\", \"id\": \"resolveUnknownDelivery\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/review/bulk-approve\", \"path\": \"/outreach/review/bulk-approve\", \"id\": \"bulkApproveMessages\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/review/bulk-deny\", \"path\": \"/outreach/review/bulk-deny\", \"id\": \"bulkDenyMessages\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/review/bulk-skip\", \"path\": \"/outreach/review/bulk-skip\", \"id\": \"bulkSkipMessages\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/review/:messageId/recheck-autopilot\", \"path\": \"/outreach/review/:messageId/recheck-autopilot\", \"id\": \"recheckMessageAutopilot\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n] as const;\nexport type WorkspaceOperation = (typeof WORKSPACE_OPERATIONS)[number];\nexport type WorkspaceOperationId = WorkspaceOperation[\"id\"];\nexport type WorkspaceApiGroup = WorkspaceOperation[\"group\"];\n\ntype OperationPermissions = { scope: string; additionalScopes?: readonly string[]; bodyScopes?: Readonly<Record<string, readonly string[]>> };\n/** Additional authority required when a top-level body field is present. */\nexport const bodyScopeRules = (operation: OperationPermissions): [string, readonly string[]][] => Object.entries(operation.bodyScopes ?? {});\nexport const requiredScopes = (operation: OperationPermissions, body?: unknown): string[] => [\n operation.scope, ...(operation.additionalScopes ?? []),\n ...bodyScopeRules(operation).flatMap(([field, scopes]) => body && typeof body === \"object\" && Object.prototype.hasOwnProperty.call(body, field) ? scopes : []),\n].filter(Boolean);\n\n/** Existing v1 contracts remain unchanged; clients normalize their transport only. */\nexport const LEGACY_API_OPERATIONS = [\n { method: \"get\", path: \"/pricing\", id: \"getPricing\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/me\", id: \"getApiIdentity\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/credits\", id: \"getCredits\", scope: \"credits:read\", retry: \"none\" },\n { method: \"get\", path: \"/reference/countries\", id: \"listCountries\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/reference/states\", id: \"listStates\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/reference/cities\", id: \"listCities\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/reference/company-sizes\", id: \"listCompanySizes\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/reference/lead-types\", id: \"listLeadTypes\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/lead-requests\", id: \"listLeadRequests\", scope: \"lead_requests:read\", retry: \"none\" },\n { method: \"post\", path: \"/lead-requests\", id: \"createLeadRequest\", scope: \"lead_requests:write\", additionalScopes: [\"leads:read\"], retry: \"header\" },\n { method: \"get\", path: \"/lead-requests/:id\", id: \"getLeadRequest\", scope: \"lead_requests:read\", retry: \"none\" },\n { method: \"post\", path: \"/company-requests\", id: \"createCompanyRequest\", scope: \"company_requests:write\", additionalScopes: [\"company_requests:read\"], retry: \"header\" },\n { method: \"get\", path: \"/company-requests/:id\", id: \"getCompanyRequest\", scope: \"company_requests:read\", retry: \"none\" },\n] as const;\nexport const CLIENT_OPERATIONS = [...WORKSPACE_OPERATIONS, ...LEGACY_API_OPERATIONS.map(operation => ({ ...operation, group: \"legacy\" as const, nativePath: operation.path }))] as const;\nexport type ClientOperationId = (typeof CLIENT_OPERATIONS)[number][\"id\"];\n", "import { CLIENT_OPERATIONS, requiredScopes, type ClientOperationId } from \"./workspace-operations.js\";\n\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json };\nexport type JsonObject = { [key: string]: Json };\nexport type ApiResult<T = Json> = { data: T; request_id: string };\nexport type CallInput = {\n params?: Record<string, string>;\n query?: Record<string, string | number | boolean | readonly string[]>;\n body?: JsonObject;\n /** Caller-owned identity. Persist alongside the body before a durable create. */\n idempotencyKey?: string;\n signal?: AbortSignal;\n /** Explicitly allow this call to authorize delivery. Does not grant API scopes. */\n allowSend?: boolean;\n};\nexport class LeadpoetError extends Error {\n constructor(message: string, readonly status: number, readonly code: string,\n readonly requestId?: string, readonly details?: Json, readonly retryAfterSeconds?: number) {\n super(message); this.name = \"LeadpoetError\";\n }\n}\nconst object = (value: unknown): value is JsonObject => Boolean(value) && typeof value === \"object\" && !Array.isArray(value);\nconst keyRequired = (retry: string) => [\"header\", \"header_uuid\", \"operation_id\", \"request_id\", \"body\"].includes(retry);\nexport const operations = CLIENT_OPERATIONS.map(({ nativePath: _native, group: _group, ...operation }) => operation);\n\n/** One credential per instance. No global credential store, cookies, or ambient session. */\nexport class LeadpoetClient {\n readonly baseUrl: string;\n readonly #apiKey: string;\n private readonly fetcher: typeof fetch;\n private readonly timeoutMs: number;\n constructor(options: { baseUrl: string; apiKey: string; fetch?: typeof fetch; timeoutMs?: number }) {\n const url = new URL(options.baseUrl);\n if (url.username || url.password || url.search || url.hash ||\n !(url.protocol === \"https:\" || (url.protocol === \"http:\" && [\"localhost\", \"127.0.0.1\", \"[::1]\"].includes(url.hostname)))) {\n throw new Error(\"Use an HTTPS API base URL, or HTTP on localhost; credentials, query strings and fragments are forbidden\");\n }\n if (url.pathname.replace(/\\/$/, \"\") !== \"/api/v1\") throw new Error(\"The API base URL must end in /api/v1\");\n if (!options.apiKey || /\\s/.test(options.apiKey)) throw new LeadpoetError(\"Set LEADPOET_API_KEY to a valid API key\", 401, \"authentication_required\");\n this.baseUrl = url.href.replace(/\\/$/, \"\");\n this.#apiKey = options.apiKey;\n this.fetcher = options.fetch ?? fetch;\n this.timeoutMs = options.timeoutMs ?? 30_000;\n if (!Number.isSafeInteger(this.timeoutMs) || this.timeoutMs < 1 || this.timeoutMs > 300_000) throw new Error(\"timeoutMs must be an integer between 1 and 300000\");\n }\n async openapi(signal?: AbortSignal): Promise<JsonObject> {\n const { value: result, requestId } = await this.request(\"/openapi.json\", \"GET\", undefined, undefined, signal);\n if (!object(result) || !object(result.paths)) throw new LeadpoetError(\"Invalid OpenAPI response\", 502, \"invalid_response\", requestId);\n return result;\n }\n async call<T = Json>(operationId: ClientOperationId, input: CallInput = {}): Promise<ApiResult<T>> {\n const operation = CLIENT_OPERATIONS.find(item => item.id === operationId);\n if (!operation) throw new Error(\"Unknown operation; use operations to discover supported calls\");\n if (requiredScopes(operation, input.body).includes(\"outreach:send\") && input.allowSend !== true) throw new Error(\"This operation authorizes delivery; explicit allowSend is required\");\n const expected = [...operation.path.matchAll(/:([A-Za-z]+)/g)].map(match => match[1]);\n if (Object.keys(input.params ?? {}).some(name => !expected.includes(name))) throw new Error(\"Unexpected path parameter\");\n let path: string = operation.path;\n for (const name of expected) {\n const value = input.params?.[name];\n if (!value || !/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test(value)) throw new Error(`Expected UUID parameter: ${name}`);\n path = path.replace(`:${name}`, encodeURIComponent(value));\n }\n if (keyRequired(operation.retry) && !input.idempotencyKey) throw new Error(\"This operation requires a persisted idempotencyKey\");\n if (input.idempotencyKey && !/^[A-Za-z0-9._:-]{8,160}$/.test(input.idempotencyKey)) throw new Error(\"Invalid idempotencyKey\");\n if (operation.method === \"get\" && input.body !== undefined) throw new Error(\"Read operations do not accept a body\");\n const query = new URLSearchParams();\n for (const [name, value] of Object.entries(input.query ?? {})) {\n if (Array.isArray(value)) for (const item of value) query.append(name, item);\n else query.set(name, String(value));\n }\n if (query.size) path += `?${query}`;\n const { value: result, requestId } = await this.request(path, operation.method.toUpperCase(), input.body, input.idempotencyKey, input.signal, operation.group === \"legacy\");\n if (!object(result) || !(\"data\" in result) || typeof result.request_id !== \"string\") throw new LeadpoetError(\"Invalid API response\", 502, \"invalid_response\", requestId);\n return result as ApiResult<T>;\n }\n /** Bounded paging for the request history contract. Other cursors are operation-specific. */\n async *requestPages(options: { page?: number; limit?: number; maxPages?: number; signal?: AbortSignal } = {}): AsyncGenerator<ApiResult<JsonObject>> {\n const max = options.maxPages ?? 100;\n if (!Number.isInteger(max) || max < 1 || max > 1000) throw new Error(\"maxPages must be between 1 and 1000\");\n const start = options.page ?? 1, limit = options.limit ?? 25;\n if (!Number.isInteger(start) || start < 1 || start > 100_000 || !Number.isInteger(limit) || limit < 1 || limit > 100) throw new Error(\"Invalid request pagination bounds\");\n for (let page = start, count = 0; count < max; page++, count++) {\n const result = await this.call<JsonObject>(\"listRequests\", { query: { page, limit }, signal: options.signal });\n if (!object(result.data) || typeof result.data.total !== \"number\" || !Number.isSafeInteger(result.data.total) || result.data.total < 0 || !Array.isArray(result.data.queries)) {\n throw new LeadpoetError(\"Invalid request pagination metadata\", 502, \"invalid_response\", result.request_id);\n }\n yield result;\n if (page * limit >= result.data.total) return;\n }\n throw new LeadpoetError(\"Pagination limit reached; resume from the last page\", 0, \"pagination_limit\");\n }\n async waitForRequest(id: string, options: { timeoutMs?: number; intervalMs?: number; signal?: AbortSignal } = {}): Promise<ApiResult<JsonObject>> {\n const timeout = options.timeoutMs ?? 300_000, interval = options.intervalMs ?? 2_000;\n if (!Number.isSafeInteger(timeout) || timeout < 1 || timeout > 3_600_000 || !Number.isSafeInteger(interval) || interval < 1 || interval > 3_600_000) throw new Error(\"Invalid polling bounds\");\n const signal = AbortSignal.any([AbortSignal.timeout(timeout), ...(options.signal ? [options.signal] : [])]);\n while (true) {\n const result = await this.call<JsonObject>(\"getRequest\", { params: { id }, signal });\n if (!object(result.data) || typeof result.data.status !== \"string\" || !result.data.status.trim()) {\n throw new LeadpoetError(\"Invalid request status response\", 502, \"invalid_response\", result.request_id);\n }\n if ([\"ready\", \"error\", \"completed\", \"failed\", \"cancelled\", \"canceled\"].includes(String(result.data.status))) return result;\n if (![\"pending\", \"processing\"].includes(result.data.status)) {\n throw new LeadpoetError(\"Invalid request status response\", 502, \"invalid_response\", result.request_id);\n }\n await new Promise<void>((resolve, reject) => {\n const onAbort = () => { clearTimeout(timer); reject(signal.reason); };\n const timer = setTimeout(() => { signal.removeEventListener(\"abort\", onAbort); resolve(); }, interval);\n signal.addEventListener(\"abort\", onAbort, { once: true });\n if (signal.aborted) onAbort();\n });\n }\n }\n private async request(path: string, method: string, body?: JsonObject, idempotencyKey?: string, signal?: AbortSignal, wrapLegacy = false): Promise<{ value: Json; requestId?: string }> {\n // Never automatically retry writes: an interrupted response can follow a committed action.\n const deadline = AbortSignal.any([AbortSignal.timeout(this.timeoutMs), ...(signal ? [signal] : [])]);\n const response = await this.fetcher(this.baseUrl + path, {\n method, redirect: \"error\", credentials: \"omit\",\n headers: { Authorization: `Bearer ${this.#apiKey}`, Accept: \"application/json\", ...(body ? { \"Content-Type\": \"application/json\" } : {}), ...(idempotencyKey ? { \"Idempotency-Key\": idempotencyKey } : {}) },\n ...(body ? { body: JSON.stringify(body) } : {}),\n signal: deadline,\n });\n // Proxy failures may have no JSON body. Capture backoff headers before\n // parsing so SDK, CLI and MCP callers can still honor the server's delay.\n const retry = response.headers.get(\"retry-after\");\n const seconds = retry ? (/^\\d+$/.test(retry) ? Number(retry) : Math.max(0, Math.ceil((Date.parse(retry) - Date.now()) / 1000))) : undefined;\n const retryAfterSeconds = Number.isFinite(seconds) ? seconds : undefined;\n let value: Json;\n let cancelBody: () => void = () => {};\n try {\n // Keep an explicit cancellation listener through body consumption. Some\n // fetch transports can leave their body promise pending after headers.\n value = await new Promise<Json>((resolve, reject) => {\n cancelBody = () => reject(deadline.reason);\n deadline.addEventListener(\"abort\", cancelBody, { once: true });\n if (deadline.aborted) { cancelBody(); return; }\n response.json().then(resolve, reject);\n });\n }\n catch {\n // Fetch can resolve headers before the deadline interrupts the body.\n // Keep cancellation distinct from malformed JSON and never retry a write.\n deadline.throwIfAborted();\n throw new LeadpoetError(\"The API returned a non-JSON response\", response.ok ? 502 : response.status, \"invalid_response\", response.headers.get(\"x-request-id\") ?? undefined, undefined, retryAfterSeconds);\n } finally { deadline.removeEventListener(\"abort\", cancelBody); }\n if (!response.ok) {\n const error = object(value) && object(value.error) ? value.error : {};\n throw new LeadpoetError(typeof error.message === \"string\" ? error.message : \"API request failed\", response.status,\n typeof error.code === \"string\" ? error.code : \"request_failed\",\n typeof error.request_id === \"string\" ? error.request_id : response.headers.get(\"x-request-id\") ?? undefined,\n error.details, retryAfterSeconds);\n }\n const requestId = response.headers.get(\"x-request-id\") ?? undefined;\n return { value: wrapLegacy ? { data: value, request_id: requestId ?? \"\" } : value, requestId };\n }\n}\n"],
5
- "mappings": ";;;AAAA,SAAS,kBAAkB,oBAAoB;AAC/C,SAAS,iBAAiB;AAE1B,SAAS,qBAAqB;;;ACFvB,IAAM,uBAAuB;AAAA,EAClC,EAAC,UAAU,QAAQ,cAAc,iBAAiB,QAAQ,aAAa,MAAM,iBAAiB,SAAS,qBAAqB,cAAc,EAAE,cAAc,CAAC,eAAe,EAAE,GAAG,SAAS,aAAa,SAAS,SAAQ;AAAA,EACtN,EAAC,UAAU,OAAO,cAAc,kCAAkC,QAAQ,8BAA8B,MAAM,uBAAuB,SAAS,oBAAoB,SAAS,aAAa,SAAS,OAAM;AAAA,EACvM,EAAC,UAAU,OAAO,cAAc,gBAAgB,QAAQ,aAAa,MAAM,gBAAgB,SAAS,oBAAoB,SAAS,aAAa,SAAS,OAAM;AAAA,EAC7J,EAAC,UAAU,OAAO,cAAc,oBAAoB,QAAQ,iBAAiB,MAAM,cAAc,SAAS,oBAAoB,SAAS,aAAa,SAAS,OAAM;AAAA,EACnK,EAAC,UAAU,OAAO,cAAc,yBAAyB,QAAQ,aAAa,MAAM,eAAe,SAAS,iBAAiB,SAAS,aAAa,SAAS,OAAM;AAAA,EAClK,EAAC,UAAU,SAAS,cAAc,mCAAmC,QAAQ,2BAA2B,MAAM,iBAAiB,SAAS,kBAAkB,SAAS,aAAa,SAAS,QAAO;AAAA,EAChM,EAAC,UAAU,OAAO,cAAc,sDAAsD,QAAQ,0CAA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AK,aAAa,QAAQ,KAAK,CAAC,CAAC,MAAM,cAAc,YAAY,GAAG,GAAG;AACvF,UAAQ,WAAW,MAAM,OAAO,QAAQ,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,UAAQ,QAAQ,OAAO,MAAM,OAAO,IAAI,GAAG,KAAK,UAAQ,QAAQ,OAAO,MAAM,OAAO,IAAI,EAAE,CAAC;AAC3J;",
4
+ "sourcesContent": ["import { createReadStream, realpathSync } from \"node:fs\";\nimport { parseArgs } from \"node:util\";\nimport type { Readable } from \"node:stream\";\nimport { fileURLToPath } from \"node:url\";\nimport { LeadpoetClient, LeadpoetError, operations, type JsonObject } from \"../shared/leadpoet-client\";\nimport type { ClientOperationId } from \"../shared/workspace-operations\";\n\nconst help = `Leadpoet \u2014 Lead engine, Pipeline and Outreach\n\n leadpoet operations\n leadpoet describe <operation>\n leadpoet call <operation> [--params '{\"id\":\"...\"}'] [--query '{\"limit\":25}']\n [--input body.json | --input -] [--idempotency-key persisted-key] [--allow-send]\n leadpoet wait <request-uuid> [--timeout 300]\n\nSet LEADPOET_API_KEY and LEADPOET_API_BASE (HTTPS URL ending in /api/v1).\nOutput is JSON. Exit codes: 0 success, 1 transport/server, 2 invalid input,\n3 credentials/permission, 4 conflict, 5 rate limit, 6 pending/failed request, 130 interrupted.\nWrites are never automatically retried. Keep the same key and body on retry.\n`;\nconst parseObject = (text: string): JsonObject => {\n let value;\n try { value = JSON.parse(text); }\n catch { throw new Error(\"Invalid JSON input; provide a JSON object\"); }\n if (!value || typeof value !== \"object\" || Array.isArray(value)) throw new Error(\"Expected a JSON object\");\n return value;\n};\nexport async function readCliBody(input: Readable, signal: AbortSignal): Promise<JsonObject> {\n signal.throwIfAborted();\n const abort = () => input.destroy(signal.reason);\n signal.addEventListener(\"abort\", abort, { once: true });\n try {\n const chunks: Buffer[] = []; let size = 0;\n for await (const chunk of input) {\n const bytes = Buffer.from(chunk); size += bytes.length;\n if (size > 256 * 1024) throw new Error(\"Request body exceeds 256 KiB\");\n chunks.push(bytes);\n }\n signal.throwIfAborted();\n return parseObject(Buffer.concat(chunks).toString(\"utf8\"));\n } finally { signal.removeEventListener(\"abort\", abort); }\n}\nexport async function runCli(args: string[], io: { out: (text: string) => void; err: (text: string) => void }, env: NodeJS.ProcessEnv = process.env): Promise<number> {\n try {\n const { values, positionals } = parseArgs({ args, allowPositionals: true, strict: true, options: {\n help: { type: \"boolean\", short: \"h\" }, params: { type: \"string\" }, query: { type: \"string\" },\n input: { type: \"string\" }, \"idempotency-key\": { type: \"string\" }, \"allow-send\": { type: \"boolean\" }, timeout: { type: \"string\" },\n } });\n if (values.help || !positionals.length) { io.out(help); return 0; }\n const [command, id] = positionals;\n if (positionals.length > (command === \"operations\" ? 1 : 2)) throw new Error(\"Extra arguments are not supported; use --help\");\n const allowedOptions = command === \"call\"\n ? [\"params\", \"query\", \"input\", \"idempotency-key\", \"allow-send\"]\n : command === \"wait\" ? [\"timeout\"] : [];\n if (Object.keys(values).some(option => option !== \"help\" && !allowedOptions.includes(option))) {\n throw new Error(\"These options are not supported by this command; use --help\");\n }\n if (command === \"operations\") { io.out(JSON.stringify(operations, null, 2)); return 0; }\n if (![\"describe\", \"call\", \"wait\"].includes(command) || !id) throw new Error(\"Choose describe, call, or wait and an operation or request ID\");\n const operation = operations.find(item => item.id === id);\n if (command !== \"wait\" && !operation) throw new Error(\"Unknown operation; run leadpoet operations\");\n const client = new LeadpoetClient({ baseUrl: env.LEADPOET_API_BASE ?? \"https://leadpoet.com/api/v1\", apiKey: env.LEADPOET_API_KEY ?? \"\" });\n const controller = new AbortController();\n const abort = () => controller.abort(new DOMException(\"Interrupted; writes may have committed. Keep the original retry key.\", \"AbortError\"));\n process.once(\"SIGINT\", abort);\n try {\n if (command === \"describe\") {\n const spec = await client.openapi(controller.signal);\n const paths = spec.paths as JsonObject;\n const path = operation!.path.replace(/:([A-Za-z]+)/g, \"{$1}\");\n const contract = (paths[path] as JsonObject | undefined)?.[operation!.method];\n if (!contract) throw new Error(\"This deployment does not expose this operation\");\n io.out(JSON.stringify({ operation: contract, components: spec.components ?? {} }, null, 2)); return 0;\n }\n if (command === \"wait\") {\n const result = await client.waitForRequest(id, { timeoutMs: Number(values.timeout ?? 300) * 1000, signal: controller.signal });\n io.out(JSON.stringify(result, null, 2)); return [\"ready\", \"completed\"].includes(String(result.data.status)) ? 0 : 6;\n }\n const params = values.params ? parseObject(values.params) : undefined;\n if (params && Object.values(params).some(value => typeof value !== \"string\")) throw new Error(\"Path parameter values must be strings\");\n const query = values.query ? parseObject(values.query) : undefined;\n if (query && Object.values(query).some(value => value === null || (typeof value === \"object\" && !(Array.isArray(value) && value.every(item => typeof item === \"string\"))))) throw new Error(\"Query values must be scalars or string arrays\");\n let body: JsonObject | undefined;\n if (values.input) {\n body = await readCliBody(values.input === \"-\" ? process.stdin : createReadStream(values.input), controller.signal);\n }\n const result = await client.call(id as ClientOperationId, {\n params: params as Record<string, string> | undefined,\n query: query as Record<string, string | number | boolean | string[]> | undefined,\n body, idempotencyKey: values[\"idempotency-key\"], allowSend: values[\"allow-send\"], signal: controller.signal,\n });\n io.out(JSON.stringify(result, null, 2)); return 0;\n } finally { process.removeListener(\"SIGINT\", abort); }\n } catch (error) {\n const known = error instanceof LeadpoetError;\n const code = known ? error.code : error instanceof Error && error.name === \"TimeoutError\" ? \"timeout\" : error instanceof Error && error.name === \"AbortError\" ? \"interrupted\" : \"client_error\";\n // Native fetch errors can contain URLs and headers in their cause. Never serialize them.\n io.err(JSON.stringify({ error: { code, message: known ? error.message : error instanceof Error ? error.message : \"Request failed\", ...(known ? { status: error.status, request_id: error.requestId, details: error.details, retry_after_seconds: error.retryAfterSeconds } : {}) } }));\n if (known) return [401, 403].includes(error.status) ? 3 : error.status === 409 ? 4 : error.status === 429 ? 5 : error.status >= 500 ? 1 : 2;\n return code === \"interrupted\" ? 130 : code === \"timeout\" ? 6 : error instanceof TypeError ? 1 : 2;\n }\n}\nif (process.argv[1] && realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) {\n process.exitCode = await runCli(process.argv.slice(2), { out: text => process.stdout.write(text + \"\\n\"), err: text => process.stderr.write(text + \"\\n\") });\n // SIGINT ends this executable even if an aborted transport retains a socket.\n // Drain the structured interruption warning before terminating the process.\n if (process.exitCode === 130) process.stderr.write(\"\", () => process.exit(130));\n}\n", "/** Explicit public surface: adding an app route never exposes it automatically. */\nexport const WORKSPACE_OPERATIONS = [\n {\"method\": \"post\", \"nativePath\": \"/api/requests\", \"path\": \"/requests\", \"id\": \"createRequest\", \"scope\": \"lead_engine:write\", \"bodyScopes\": { \"recurrence\": [\"outreach:send\"] }, \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"get\", \"nativePath\": \"/api/requests/contact-settings\", \"path\": \"/requests/contact-settings\", \"id\": \"getContactAllowance\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/queries\", \"path\": \"/requests\", \"id\": \"listRequests\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/queries/:id\", \"path\": \"/requests/:id\", \"id\": \"getRequest\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline\", \"path\": \"/pipeline\", \"id\": \"getPipeline\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/cards/:id\", \"path\": \"/pipeline/companies/:id\", \"id\": \"updateCompany\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/contact-enrichment/readiness\", \"path\": \"/pipeline/contact-enrichment/readiness\", \"id\": \"getContactReadiness\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/company-pipeline/cards/:id/contact-requests\", \"path\": \"/pipeline/companies/:id/contact-requests\", \"id\": \"requestContacts\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"post\", \"nativePath\": \"/api/company-pipeline/leads/:id/contact-enrichment\", \"path\": \"/pipeline/contacts/:id/enrich\", \"id\": \"enrichContact\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"post\", \"nativePath\": \"/api/pipeline/find-person\", \"path\": \"/people/find\", \"id\": \"findPerson\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"get\", \"nativePath\": \"/api/pipeline/contacts/lookup\", \"path\": \"/pipeline/contacts/lookup\", \"id\": \"lookupContact\", \"scope\": \"pipeline:read\", \"additionalScopes\": [\"outreach:read\"], \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/pipeline/leads\", \"path\": \"/pipeline/contacts\", \"id\": \"addContact\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"header_uuid\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/contact-requests/:requestId\", \"path\": \"/pipeline/companies/:cardId/contact-requests/:requestId\", \"id\": \"getContactRequest\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/contact-requests/latest\", \"path\": \"/pipeline/companies/:cardId/contact-requests/latest\", \"id\": \"getLatestContactRequest\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/account-monitoring/alert-groups\", \"path\": \"/signals\", \"id\": \"listSignals\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/account-monitoring/accounts/:cardId\", \"path\": \"/signals/accounts/:cardId\", \"id\": \"getAccountWatch\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/account-monitoring/accounts/watch\", \"path\": \"/signals/watch\", \"id\": \"watchAccounts\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/api/account-monitoring/monitors/status\", \"path\": \"/signals/watch-status\", \"id\": \"setWatchStatus\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/api/account-monitoring/events/state\", \"path\": \"/signals/state\", \"id\": \"markSignals\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/api/icp-profiles\", \"path\": \"/icps\", \"id\": \"listIcps\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/audiences\", \"path\": \"/icps/audiences\", \"id\": \"createIcp\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"get\", \"nativePath\": \"/api/icp-profiles/:icpId\", \"path\": \"/icps/:icpId\", \"id\": \"getIcp\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/icp-profiles/:icpId/products\", \"path\": \"/icps/:icpId/products\", \"id\": \"listIcpProducts\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/icp-profiles/:icpId/versions\", \"path\": \"/icps/:icpId/versions\", \"id\": \"listIcpVersions\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/:icpId/draft\", \"path\": \"/icps/:icpId/draft\", \"id\": \"createIcpDraft\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/icp-profiles/:icpId/drafts/:draftId\", \"path\": \"/icps/:icpId/drafts/:draftId\", \"id\": \"updateIcpDraft\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/:icpId/drafts/:draftId/publish\", \"path\": \"/icps/:icpId/drafts/:draftId/publish\", \"id\": \"publishIcp\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/:icpId/archive\", \"path\": \"/icps/:icpId/archive\", \"id\": \"archiveIcp\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/contact-engagements\", \"path\": \"/pipeline/contacts\", \"id\": \"listPipelineContacts\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/contact-engagements/:engagementId/stage\", \"path\": \"/pipeline/contacts/:engagementId/stage\", \"id\": \"moveContact\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"body\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/contact-engagements/:engagementId/pin\", \"path\": \"/pipeline/contacts/:engagementId/pin\", \"id\": \"pinContact\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/deals\", \"path\": \"/pipeline/deals\", \"id\": \"listDeals\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/deals\", \"path\": \"/pipeline/companies/:cardId/deals\", \"id\": \"createDeal\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/deals/:dealId\", \"path\": \"/pipeline/deals/:dealId\", \"id\": \"updateDeal\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/deals/:dealId/stage\", \"path\": \"/pipeline/deals/:dealId/stage\", \"id\": \"moveDeal\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"body\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/pipeline-config\", \"path\": \"/pipeline/configuration\", \"id\": \"getPipelineConfiguration\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/notes\", \"path\": \"/pipeline/companies/:cardId/notes\", \"id\": \"listCompanyNotes\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/observations\", \"path\": \"/pipeline/companies/:cardId/observations\", \"id\": \"getCompanyObservations\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/fit-ratings\", \"path\": \"/pipeline/companies/:cardId/fit-ratings\", \"id\": \"listCompanyFitRatings\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/fit-ratings\", \"path\": \"/pipeline/companies/:cardId/fit-ratings\", \"id\": \"rateCompanyFit\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"header_uuid\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/icps/:icpId/fit-insights\", \"path\": \"/pipeline/icps/:icpId/fit-insights\", \"id\": \"getIcpFitInsights\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/billing/credits\", \"path\": \"/billing/credits\", \"id\": \"getCreditBalance\", \"scope\": \"credits:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/billing/credit-history\", \"path\": \"/billing/credit-history\", \"id\": \"getCreditHistory\", \"scope\": \"credits:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/deal-candidates\", \"path\": \"/pipeline/deal-candidates\", \"id\": \"listDealCandidates\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/notes\", \"path\": \"/pipeline/companies/:cardId/notes\", \"id\": \"createCompanyNote\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"header_uuid\"},\n {\"method\": \"get\", \"nativePath\": \"/accounts\", \"path\": \"/outreach/accounts\", \"id\": \"listSendingAccounts\", \"scope\": \"outreach:read\", \"group\": \"outreach\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/conversations\", \"path\": \"/outreach/conversations\", \"id\": \"listConversations\", \"scope\": \"outreach:read\", \"group\": \"outreach\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/workspace-profile\", \"path\": \"/outreach/profile\", \"id\": \"getOutreachProfile\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"put\", \"nativePath\": \"/workspace-profile\", \"path\": \"/outreach/profile\", \"id\": \"updateOutreachProfile\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/audience-sources\", \"path\": \"/outreach/audience-sources\", \"id\": \"listAudienceSources\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/audience-contacts\", \"path\": \"/outreach/audience-contacts\", \"id\": \"listAudienceContacts\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/audience-selection/availability\", \"path\": \"/outreach/audiences/availability\", \"id\": \"checkAudienceAvailability\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"safe\"},\n {\"method\": \"post\", \"nativePath\": \"/audience-snapshots/preview-selection\", \"path\": \"/outreach/audiences/preview\", \"id\": \"previewAudience\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"post\", \"nativePath\": \"/audience-snapshots/from-selection\", \"path\": \"/outreach/audiences\", \"id\": \"createAudience\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies\", \"path\": \"/outreach/campaigns\", \"id\": \"listCampaigns\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/campaign-product-descriptions\", \"path\": \"/outreach/campaign-product-descriptions\", \"id\": \"listCampaignProductDescriptions\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies\", \"path\": \"/outreach/campaigns\", \"id\": \"createCampaign\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id\", \"path\": \"/outreach/campaigns/:id\", \"id\": \"getCampaign\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"put\", \"nativePath\": \"/strategies/:id\", \"path\": \"/outreach/campaigns/:id\", \"id\": \"updateCampaign\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/preview\", \"path\": \"/outreach/campaigns/:id/preview\", \"id\": \"previewCampaign\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"safe\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/contract-proposal\", \"path\": \"/outreach/campaigns/:id/contract-proposal\", \"id\": \"proposeCampaignContract\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"safe\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/launch\", \"path\": \"/outreach/campaigns/:id/launch\", \"id\": \"launchCampaign\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/pause\", \"path\": \"/outreach/campaigns/:id/pause\", \"id\": \"pauseCampaign\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/resume\", \"path\": \"/outreach/campaigns/:id/resume\", \"id\": \"resumeCampaign\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id/resume-summary\", \"path\": \"/outreach/campaigns/:id/resume-summary\", \"id\": \"getCampaignResumeSummary\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/review\", \"path\": \"/outreach/review\", \"id\": \"listReview\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/review/summary\", \"path\": \"/outreach/review/summary\", \"id\": \"getReviewSummary\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/review/:messageId/deny\", \"path\": \"/outreach/review/:messageId/deny\", \"id\": \"denyMessage\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/review/:messageId/skip\", \"path\": \"/outreach/review/:messageId/skip\", \"id\": \"skipMessage\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"get\", \"nativePath\": \"/replies\", \"path\": \"/outreach/replies\", \"id\": \"listReplies\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/performance/summary\", \"path\": \"/outreach/analytics\", \"id\": \"getOutreachAnalytics\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/review/prepare-approval\", \"path\": \"/outreach/review/approve\", \"id\": \"approveMessages\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/conversations/:id/reply\", \"path\": \"/outreach/conversations/:id/reply\", \"id\": \"replyToConversation\", \"scope\": \"outreach:send\", \"group\": \"outreach\", \"retry\": \"request_id\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/archive\", \"path\": \"/outreach/campaigns/:id/archive\", \"id\": \"archiveCampaign\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/\", \"path\": \"/outreach/sequence-templates\", \"id\": \"listSequenceTemplates\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/:id\", \"path\": \"/outreach/sequence-templates/:id\", \"id\": \"getSequenceTemplate\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/from-campaign/:id\", \"path\": \"/outreach/campaigns/:id/sequence\", \"id\": \"getCampaignSequence\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/\", \"path\": \"/outreach/sequence-templates\", \"id\": \"createSequenceTemplate\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"post\", \"nativePath\": \"/:id/duplicate\", \"path\": \"/outreach/sequence-templates/:id/duplicate\", \"id\": \"duplicateSequenceTemplate\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"post\", \"nativePath\": \"/:id/archive\", \"path\": \"/outreach/sequence-templates/:id/archive\", \"id\": \"archiveSequenceTemplate\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id/messaging\", \"path\": \"/outreach/campaigns/:id/messaging\", \"id\": \"getCampaignMessaging\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"put\", \"nativePath\": \"/strategies/:id/messaging\", \"path\": \"/outreach/campaigns/:id/messaging\", \"id\": \"updateCampaignMessaging\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"get\", \"nativePath\": \"/api/recurring-requests\", \"path\": \"/recurring-requests\", \"id\": \"listRecurringRequests\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/recurring-requests/options\", \"path\": \"/recurring-requests/options\", \"id\": \"getRecurringRequestOptions\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/recurring-requests\", \"path\": \"/recurring-requests\", \"id\": \"createRecurringRequest\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"operation_id\", \"additionalScopes\": [\"outreach:send\"]},\n {\"method\": \"patch\", \"nativePath\": \"/api/recurring-requests/setups/:id\", \"path\": \"/recurring-requests/setups/:id\", \"id\": \"updateRecurringSetup\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"bound\", \"additionalScopes\": [\"outreach:send\"]},\n {\"method\": \"patch\", \"nativePath\": \"/api/recurring-requests/:id\", \"path\": \"/recurring-requests/:id\", \"id\": \"updateRecurringRequest\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"bound\", \"additionalScopes\": [\"outreach:send\"]},\n {\"method\": \"get\", \"nativePath\": \"/api/assistant/schedules\", \"path\": \"/agent/schedules\", \"id\": \"listAgentSchedules\", \"scope\": \"outreach:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/assistant/schedules\", \"path\": \"/agent/schedules\", \"id\": \"createAgentSchedule\", \"scope\": \"outreach:write\", \"group\": \"workspace\", \"retry\": \"operation_id\", \"additionalScopes\": [\"lead_engine:read\", \"pipeline:read\", \"outreach:read\"]},\n {\"method\": \"patch\", \"nativePath\": \"/api/assistant/schedules/:id\", \"path\": \"/agent/schedules/:id\", \"id\": \"updateAgentSchedule\", \"scope\": \"outreach:write\", \"group\": \"workspace\", \"retry\": \"state\", \"additionalScopes\": [\"lead_engine:read\", \"pipeline:read\", \"outreach:read\"]},\n {\"method\": \"get\", \"nativePath\": \"/api/assistant/schedules/:id/runs\", \"path\": \"/agent/schedules/:id/runs\", \"id\": \"listAgentScheduleRuns\", \"scope\": \"outreach:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/assistant/memories\", \"path\": \"/agent/memories\", \"id\": \"listAgentMemories\", \"scope\": \"outreach:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/assistant/memories\", \"path\": \"/agent/memories\", \"id\": \"createAgentMemory\", \"scope\": \"outreach:write\", \"group\": \"workspace\", \"retry\": \"operation_id\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/assistant/memories/:id\", \"path\": \"/agent/memories/:id\", \"id\": \"updateAgentMemory\", \"scope\": \"outreach:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/queued\", \"path\": \"/outreach/queued\", \"id\": \"listQueuedMessages\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/queued/:messageId\", \"path\": \"/outreach/queued/:messageId\", \"id\": \"getQueuedMessage\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/queued/:messageId/outcome\", \"path\": \"/outreach/queued/:messageId/outcome\", \"id\": \"getMessageOutcome\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/queued/priority\", \"path\": \"/outreach/queued/priority\", \"id\": \"prioritizeMessages\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"request_id\"},\n {\"method\": \"post\", \"nativePath\": \"/queued/:messageId/cancel\", \"path\": \"/outreach/queued/:messageId/cancel\", \"id\": \"cancelQueuedMessage\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/queued/:messageId/return-to-review\", \"path\": \"/outreach/queued/:messageId/return-to-review\", \"id\": \"returnQueuedMessageToReview\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"get\", \"nativePath\": \"/queued/:messageId/edit-session\", \"path\": \"/outreach/queued/:messageId/edit-session\", \"id\": \"getQueuedMessageEditSession\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/queued/:messageId/resume-unchanged\", \"path\": \"/outreach/queued/:messageId/resume-unchanged\", \"id\": \"resumeQueuedMessageUnchanged\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/queued/:messageId/send-now\", \"path\": \"/outreach/queued/:messageId/send-now\", \"id\": \"sendQueuedMessageNow\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/queued/:messageId/send-sooner\", \"path\": \"/outreach/queued/:messageId/send-sooner\", \"id\": \"sendQueuedMessageSooner\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"patch\", \"nativePath\": \"/strategies/:id/name\", \"path\": \"/outreach/campaigns/:id/name\", \"id\": \"renameCampaign\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/restore\", \"path\": \"/outreach/campaigns/:id/restore\", \"id\": \"restoreCampaign\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/sender-allocations/preview\", \"path\": \"/outreach/sender-allocations/preview\", \"id\": \"previewSenderAllocations\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"safe\"},\n {\"method\": \"put\", \"nativePath\": \"/strategies/:id/sending-schedule\", \"path\": \"/outreach/campaigns/:id/sending-schedule\", \"id\": \"updateCampaignSchedule\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id/activity\", \"path\": \"/outreach/campaigns/:id/activity\", \"id\": \"getCampaignActivity\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id/decisions\", \"path\": \"/outreach/campaigns/:id/decisions\", \"id\": \"getCampaignDecisions\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id/reviews\", \"path\": \"/outreach/campaigns/:id/reviews\", \"id\": \"getCampaignReviews\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/audience-snapshots\", \"path\": \"/outreach/audiences\", \"id\": \"listAudiences\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/audience-snapshots/:id/funnel\", \"path\": \"/outreach/audiences/:id/funnel\", \"id\": \"getAudienceFunnel\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/audience-snapshots/:snapshotId/preflight\", \"path\": \"/outreach/audiences/:snapshotId/preflight\", \"id\": \"getAudiencePreflight\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/message-preview\", \"path\": \"/outreach/campaigns/:id/message-preview\", \"id\": \"previewCampaignMessage\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"safe\"},\n {\"method\": \"post\", \"nativePath\": \"/safety-attention/delivery-unknown/:messageId/check\", \"path\": \"/outreach/safety-attention/delivery-unknown/:messageId/check\", \"id\": \"checkMessageDelivery\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles\", \"path\": \"/icps\", \"id\": \"createManualIcp\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"get\", \"nativePath\": \"/api/icp-profiles/:icpId/usage\", \"path\": \"/icps/:icpId/usage\", \"id\": \"getIcpUsage\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id/description\", \"path\": \"/outreach/campaigns/:id/description\", \"id\": \"getCampaignDescription\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"put\", \"nativePath\": \"/strategies/:id/description\", \"path\": \"/outreach/campaigns/:id/description\", \"id\": \"updateCampaignDescription\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"get\", \"nativePath\": \"/performance/filters\", \"path\": \"/outreach/analytics/filters\", \"id\": \"getAnalyticsFilters\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/performance/analytics\", \"path\": \"/outreach/analytics/report\", \"id\": \"getAnalyticsReport\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/lead-engine-audience\", \"path\": \"/icps/lead-engine-audience\", \"id\": \"saveLeadEngineAudience\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/from-scan\", \"path\": \"/icps/from-scan\", \"id\": \"createIcpFromScan\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/:icpId/apply-preview\", \"path\": \"/icps/:icpId/apply-preview\", \"id\": \"previewIcpApplication\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"safe\"},\n {\"method\": \"post\", \"nativePath\": \"/api/icp-profiles/:icpId/promote-overrides\", \"path\": \"/icps/:icpId/promote-overrides\", \"id\": \"promoteIcpOverrides\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"header\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/deal-summaries\", \"path\": \"/pipeline/deal-summaries\", \"id\": \"getDealSummaries\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/revenue-insights\", \"path\": \"/pipeline/revenue-insights\", \"id\": \"getRevenueInsights\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/deals\", \"path\": \"/pipeline/companies/:cardId/deals\", \"id\": \"listCompanyDeals\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/cards/:id/calls\", \"path\": \"/pipeline/companies/:id/calls\", \"id\": \"listCompanyCalls\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/call-recordings/themes\", \"path\": \"/pipeline/call-themes\", \"id\": \"getCallThemes\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"get\", \"nativePath\": \"/api/call-recordings/upcoming-meetings\", \"path\": \"/pipeline/upcoming-meetings\", \"id\": \"listUpcomingMeetings\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/deals/:dealId/pin\", \"path\": \"/pipeline/deals/:dealId/pin\", \"id\": \"pinDeal\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/deals/:dealId/attribution\", \"path\": \"/pipeline/deals/:dealId/attribution\", \"id\": \"updateDealAttribution\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/deals/actions/bulk-stage\", \"path\": \"/pipeline/deals/actions/bulk-stage\", \"id\": \"moveDeals\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"body\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/contact-engagements/actions/bulk-stage\", \"path\": \"/pipeline/contacts/actions/bulk-stage\", \"id\": \"moveContacts\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"body\"},\n {\"method\": \"post\", \"nativePath\": \"/api/company-pipeline/contact-engagements/:engagementId/qualification-deal/undo\", \"path\": \"/pipeline/contacts/:engagementId/qualification-deal/undo\", \"id\": \"undoContactQualification\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"body\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/note-counts\", \"path\": \"/pipeline/companies/:cardId/note-counts\", \"id\": \"getCompanyNoteCounts\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/company-pipeline/cards/:cardId/notes/clear\", \"path\": \"/pipeline/companies/:cardId/notes/archive\", \"id\": \"archiveCompanyNotes\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/api/company-pipeline/tasks\", \"path\": \"/pipeline/tasks\", \"id\": \"listContactTasks\", \"scope\": \"pipeline:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/company-pipeline/contact-engagements/:engagementId/tasks\", \"path\": \"/pipeline/contacts/:engagementId/tasks\", \"id\": \"createContactTask\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"header_uuid\"},\n {\"method\": \"patch\", \"nativePath\": \"/api/company-pipeline/tasks/:taskId\", \"path\": \"/pipeline/tasks/:taskId\", \"id\": \"updateContactTask\", \"scope\": \"pipeline:write\", \"group\": \"workspace\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/audience/preview\", \"path\": \"/outreach/campaigns/:id/audience/preview\", \"id\": \"previewCampaignAudience\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"operation_id\", \"retryIdentity\": \"campaignAudience\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/audience/add\", \"path\": \"/outreach/campaigns/:id/audience/add\", \"id\": \"addCampaignAudience\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"operation_id\", \"retryIdentity\": \"campaignAudience\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id/audience/contacts\", \"path\": \"/outreach/campaigns/:id/audience/contacts\", \"id\": \"listCampaignContacts\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/audience/contacts/:enrollmentId/remove\", \"path\": \"/outreach/campaigns/:id/audience/contacts/:enrollmentId/remove\", \"id\": \"removePendingCampaignContact\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"get\", \"nativePath\": \"/strategies/:id/audience/unmessaged\", \"path\": \"/outreach/campaigns/:id/audience/unmessaged\", \"id\": \"getUnmessagedCampaignContacts\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/audience/unmessaged/remove\", \"path\": \"/outreach/campaigns/:id/audience/unmessaged/remove\", \"id\": \"removeUnmessagedCampaignContacts\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/audience/unmessaged/segment\", \"path\": \"/outreach/campaigns/:id/audience/unmessaged/segment\", \"id\": \"previewCampaignAudienceSegment\", \"scope\": \"outreach:read\", \"group\": \"campaigns\", \"retry\": \"safe\"},\n {\"method\": \"post\", \"nativePath\": \"/conversations/:id/sequence\", \"path\": \"/outreach/conversations/:id/sequence\", \"id\": \"updateConversationSequence\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"put\", \"nativePath\": \"/strategies/:id/contact-cap\", \"path\": \"/outreach/campaigns/:id/contact-cap\", \"id\": \"updateCampaignContactCap\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"operation_id\"},\n {\"method\": \"put\", \"nativePath\": \"/strategies/:id/sender-allocations\", \"path\": \"/outreach/campaigns/:id/sender-allocations\", \"id\": \"updateSenderAllocations\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"put\", \"nativePath\": \"/strategies/:id/sending-days\", \"path\": \"/outreach/campaigns/:id/sending-days\", \"id\": \"updateSendingDays\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/change-mode\", \"path\": \"/outreach/campaigns/:id/change-mode\", \"id\": \"changeCampaignMode\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/discard\", \"path\": \"/outreach/campaigns/:id/discard\", \"id\": \"discardCampaign\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/strategies/:id/drafts/restore\", \"path\": \"/outreach/campaigns/:id/drafts/restore\", \"id\": \"restoreCampaignDrafts\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"state\"},\n {\"method\": \"post\", \"nativePath\": \"/safety-attention/delivery-unknown/:messageId/resolve\", \"path\": \"/outreach/safety-attention/delivery-unknown/:messageId/resolve\", \"id\": \"resolveUnknownDelivery\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/review/bulk-approve\", \"path\": \"/outreach/review/bulk-approve\", \"id\": \"bulkApproveMessages\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/review/bulk-deny\", \"path\": \"/outreach/review/bulk-deny\", \"id\": \"bulkDenyMessages\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/review/bulk-skip\", \"path\": \"/outreach/review/bulk-skip\", \"id\": \"bulkSkipMessages\", \"scope\": \"outreach:write\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"post\", \"nativePath\": \"/review/:messageId/recheck-autopilot\", \"path\": \"/outreach/review/:messageId/recheck-autopilot\", \"id\": \"recheckMessageAutopilot\", \"scope\": \"outreach:send\", \"group\": \"campaigns\", \"retry\": \"bound\"},\n {\"method\": \"get\", \"nativePath\": \"/api/lead-searches\", \"path\": \"/lead-searches\", \"id\": \"listLeadSearches\", \"scope\": \"lead_engine:read\", \"group\": \"workspace\", \"retry\": \"none\"},\n {\"method\": \"post\", \"nativePath\": \"/api/lead-searches/:id/actions\", \"path\": \"/lead-searches/:id/actions\", \"id\": \"changeLeadSearch\", \"scope\": \"lead_engine:write\", \"group\": \"workspace\", \"retry\": \"bound\"},\n] as const;\nexport type WorkspaceOperation = (typeof WORKSPACE_OPERATIONS)[number];\n\n/**\n * Operations only Leadpoet's own staff may use, in their own workspace. They\n * are listed to nobody else: not in the public API description, the developer\n * docs, a connector's tools, the agent or Slack. Their routes refuse everyone\n * else on their own, so leaving one out of a list is never the only thing\n * keeping a customer out.\n */\nconst STAFF_ONLY_OPERATION_IDS: ReadonlySet<string> = new Set([\"listLeadSearches\", \"changeLeadSearch\"]);\nexport const isStaffOnlyOperation = (id: string): boolean => STAFF_ONLY_OPERATION_IDS.has(id);\n/** The operations customers are told about. */\nexport const PUBLIC_WORKSPACE_OPERATIONS = WORKSPACE_OPERATIONS.filter((operation) => !isStaffOnlyOperation(operation.id));\nexport type WorkspaceOperationId = WorkspaceOperation[\"id\"];\nexport type WorkspaceApiGroup = WorkspaceOperation[\"group\"];\n\ntype OperationPermissions = { scope: string; additionalScopes?: readonly string[]; bodyScopes?: Readonly<Record<string, readonly string[]>> };\n/** Additional authority required when a top-level body field is present. */\nexport const bodyScopeRules = (operation: OperationPermissions): [string, readonly string[]][] => Object.entries(operation.bodyScopes ?? {});\nexport const requiredScopes = (operation: OperationPermissions, body?: unknown): string[] => [\n operation.scope, ...(operation.additionalScopes ?? []),\n ...bodyScopeRules(operation).flatMap(([field, scopes]) => body && typeof body === \"object\" && Object.prototype.hasOwnProperty.call(body, field) ? scopes : []),\n].filter(Boolean);\n\n/** Existing v1 contracts remain unchanged; clients normalize their transport only. */\nexport const LEGACY_API_OPERATIONS = [\n { method: \"get\", path: \"/pricing\", id: \"getPricing\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/me\", id: \"getApiIdentity\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/credits\", id: \"getCredits\", scope: \"credits:read\", retry: \"none\" },\n { method: \"get\", path: \"/reference/countries\", id: \"listCountries\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/reference/states\", id: \"listStates\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/reference/cities\", id: \"listCities\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/reference/company-sizes\", id: \"listCompanySizes\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/reference/lead-types\", id: \"listLeadTypes\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/playbook\", id: \"getPlaybook\", scope: \"\", retry: \"none\" },\n { method: \"get\", path: \"/lead-requests\", id: \"listLeadRequests\", scope: \"lead_requests:read\", retry: \"none\" },\n { method: \"post\", path: \"/lead-requests\", id: \"createLeadRequest\", scope: \"lead_requests:write\", additionalScopes: [\"leads:read\"], retry: \"header\" },\n { method: \"get\", path: \"/lead-requests/:id\", id: \"getLeadRequest\", scope: \"lead_requests:read\", retry: \"none\" },\n { method: \"post\", path: \"/company-requests\", id: \"createCompanyRequest\", scope: \"company_requests:write\", additionalScopes: [\"company_requests:read\"], retry: \"header\" },\n { method: \"get\", path: \"/company-requests/:id\", id: \"getCompanyRequest\", scope: \"company_requests:read\", retry: \"none\" },\n] as const;\nexport const CLIENT_OPERATIONS = [...WORKSPACE_OPERATIONS, ...LEGACY_API_OPERATIONS.map(operation => ({ ...operation, group: \"legacy\" as const, nativePath: operation.path }))] as const;\nexport type ClientOperationId = (typeof CLIENT_OPERATIONS)[number][\"id\"];\n", "import { CLIENT_OPERATIONS, isStaffOnlyOperation, requiredScopes, type ClientOperationId } from \"./workspace-operations.js\";\n\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json };\nexport type JsonObject = { [key: string]: Json };\nexport type ApiResult<T = Json> = { data: T; request_id: string };\nexport type CallInput = {\n params?: Record<string, string>;\n query?: Record<string, string | number | boolean | readonly string[]>;\n body?: JsonObject;\n /** Caller-owned identity. Persist alongside the body before a durable create. */\n idempotencyKey?: string;\n signal?: AbortSignal;\n /** Explicitly allow this call to authorize delivery. Does not grant API scopes. */\n allowSend?: boolean;\n};\nexport class LeadpoetError extends Error {\n constructor(message: string, readonly status: number, readonly code: string,\n readonly requestId?: string, readonly details?: Json, readonly retryAfterSeconds?: number) {\n super(message); this.name = \"LeadpoetError\";\n }\n}\nconst object = (value: unknown): value is JsonObject => Boolean(value) && typeof value === \"object\" && !Array.isArray(value);\nconst keyRequired = (retry: string) => [\"header\", \"header_uuid\", \"operation_id\", \"request_id\", \"body\"].includes(retry);\n/** Every operation, staff-only ones included. Only a host that has verified a staff connection builds tools from this. */\nexport const allOperations = CLIENT_OPERATIONS.map(({ nativePath: _native, group: _group, ...operation }) => operation);\n/** The operations a customer is told about: what the command-line tool lists and describes, and what a connector offers. */\nexport const operations = allOperations.filter((operation) => !isStaffOnlyOperation(operation.id));\n\n/** One credential per instance. No global credential store, cookies, or ambient session. */\nexport class LeadpoetClient {\n readonly baseUrl: string;\n readonly #apiKey: string;\n private readonly fetcher: typeof fetch;\n private readonly timeoutMs: number;\n constructor(options: { baseUrl: string; apiKey: string; fetch?: typeof fetch; timeoutMs?: number }) {\n const url = new URL(options.baseUrl);\n if (url.username || url.password || url.search || url.hash ||\n !(url.protocol === \"https:\" || (url.protocol === \"http:\" && [\"localhost\", \"127.0.0.1\", \"[::1]\"].includes(url.hostname)))) {\n throw new Error(\"Use an HTTPS API base URL, or HTTP on localhost; credentials, query strings and fragments are forbidden\");\n }\n if (url.pathname.replace(/\\/$/, \"\") !== \"/api/v1\") throw new Error(\"The API base URL must end in /api/v1\");\n if (!options.apiKey || /\\s/.test(options.apiKey)) throw new LeadpoetError(\"Set LEADPOET_API_KEY to a valid API key\", 401, \"authentication_required\");\n this.baseUrl = url.href.replace(/\\/$/, \"\");\n this.#apiKey = options.apiKey;\n this.fetcher = options.fetch ?? fetch;\n this.timeoutMs = options.timeoutMs ?? 30_000;\n if (!Number.isSafeInteger(this.timeoutMs) || this.timeoutMs < 1 || this.timeoutMs > 300_000) throw new Error(\"timeoutMs must be an integer between 1 and 300000\");\n }\n async openapi(signal?: AbortSignal): Promise<JsonObject> {\n const { value: result, requestId } = await this.request(\"/openapi.json\", \"GET\", undefined, undefined, signal);\n if (!object(result) || !object(result.paths)) throw new LeadpoetError(\"Invalid OpenAPI response\", 502, \"invalid_response\", requestId);\n return result;\n }\n async call<T = Json>(operationId: ClientOperationId, input: CallInput = {}): Promise<ApiResult<T>> {\n const operation = CLIENT_OPERATIONS.find(item => item.id === operationId);\n if (!operation) throw new Error(\"Unknown operation; use operations to discover supported calls\");\n if (requiredScopes(operation, input.body).includes(\"outreach:send\") && input.allowSend !== true) throw new Error(\"This operation authorizes delivery; explicit allowSend is required\");\n const expected = [...operation.path.matchAll(/:([A-Za-z]+)/g)].map(match => match[1]);\n if (Object.keys(input.params ?? {}).some(name => !expected.includes(name))) throw new Error(\"Unexpected path parameter\");\n let path: string = operation.path;\n for (const name of expected) {\n const value = input.params?.[name];\n if (!value || !/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test(value)) throw new Error(`Expected UUID parameter: ${name}`);\n path = path.replace(`:${name}`, encodeURIComponent(value));\n }\n if (keyRequired(operation.retry) && !input.idempotencyKey) throw new Error(\"This operation requires a persisted idempotencyKey\");\n if (input.idempotencyKey && !/^[A-Za-z0-9._:-]{8,160}$/.test(input.idempotencyKey)) throw new Error(\"Invalid idempotencyKey\");\n if (operation.method === \"get\" && input.body !== undefined) throw new Error(\"Read operations do not accept a body\");\n const query = new URLSearchParams();\n for (const [name, value] of Object.entries(input.query ?? {})) {\n if (Array.isArray(value)) for (const item of value) query.append(name, item);\n else query.set(name, String(value));\n }\n if (query.size) path += `?${query}`;\n const { value: result, requestId } = await this.request(path, operation.method.toUpperCase(), input.body, input.idempotencyKey, input.signal, operation.group === \"legacy\");\n if (!object(result) || !(\"data\" in result) || typeof result.request_id !== \"string\") throw new LeadpoetError(\"Invalid API response\", 502, \"invalid_response\", requestId);\n return result as ApiResult<T>;\n }\n /** Bounded paging for the request history contract. Other cursors are operation-specific. */\n async *requestPages(options: { page?: number; limit?: number; maxPages?: number; signal?: AbortSignal } = {}): AsyncGenerator<ApiResult<JsonObject>> {\n const max = options.maxPages ?? 100;\n if (!Number.isInteger(max) || max < 1 || max > 1000) throw new Error(\"maxPages must be between 1 and 1000\");\n const start = options.page ?? 1, limit = options.limit ?? 25;\n if (!Number.isInteger(start) || start < 1 || start > 100_000 || !Number.isInteger(limit) || limit < 1 || limit > 100) throw new Error(\"Invalid request pagination bounds\");\n for (let page = start, count = 0; count < max; page++, count++) {\n const result = await this.call<JsonObject>(\"listRequests\", { query: { page, limit }, signal: options.signal });\n if (!object(result.data) || typeof result.data.total !== \"number\" || !Number.isSafeInteger(result.data.total) || result.data.total < 0 || !Array.isArray(result.data.queries)) {\n throw new LeadpoetError(\"Invalid request pagination metadata\", 502, \"invalid_response\", result.request_id);\n }\n yield result;\n if (page * limit >= result.data.total) return;\n }\n throw new LeadpoetError(\"Pagination limit reached; resume from the last page\", 0, \"pagination_limit\");\n }\n async waitForRequest(id: string, options: { timeoutMs?: number; intervalMs?: number; signal?: AbortSignal } = {}): Promise<ApiResult<JsonObject>> {\n const timeout = options.timeoutMs ?? 300_000, interval = options.intervalMs ?? 2_000;\n if (!Number.isSafeInteger(timeout) || timeout < 1 || timeout > 3_600_000 || !Number.isSafeInteger(interval) || interval < 1 || interval > 3_600_000) throw new Error(\"Invalid polling bounds\");\n const signal = AbortSignal.any([AbortSignal.timeout(timeout), ...(options.signal ? [options.signal] : [])]);\n while (true) {\n const result = await this.call<JsonObject>(\"getRequest\", { params: { id }, signal });\n if (!object(result.data) || typeof result.data.status !== \"string\" || !result.data.status.trim()) {\n throw new LeadpoetError(\"Invalid request status response\", 502, \"invalid_response\", result.request_id);\n }\n if ([\"ready\", \"error\", \"completed\", \"failed\", \"cancelled\", \"canceled\"].includes(String(result.data.status))) return result;\n if (![\"pending\", \"processing\"].includes(result.data.status)) {\n throw new LeadpoetError(\"Invalid request status response\", 502, \"invalid_response\", result.request_id);\n }\n if (object(result.data.progress) && result.data.progress.state === \"archived\") return result;\n await new Promise<void>((resolve, reject) => {\n const onAbort = () => { clearTimeout(timer); reject(signal.reason); };\n const timer = setTimeout(() => { signal.removeEventListener(\"abort\", onAbort); resolve(); }, interval);\n signal.addEventListener(\"abort\", onAbort, { once: true });\n if (signal.aborted) onAbort();\n });\n }\n }\n private async request(path: string, method: string, body?: JsonObject, idempotencyKey?: string, signal?: AbortSignal, wrapLegacy = false): Promise<{ value: Json; requestId?: string }> {\n // Never automatically retry writes: an interrupted response can follow a committed action.\n const deadline = AbortSignal.any([AbortSignal.timeout(this.timeoutMs), ...(signal ? [signal] : [])]);\n const response = await this.fetcher(this.baseUrl + path, {\n method, redirect: \"error\", credentials: \"omit\",\n headers: { Authorization: `Bearer ${this.#apiKey}`, Accept: \"application/json\", ...(body ? { \"Content-Type\": \"application/json\" } : {}), ...(idempotencyKey ? { \"Idempotency-Key\": idempotencyKey } : {}) },\n ...(body ? { body: JSON.stringify(body) } : {}),\n signal: deadline,\n });\n // Proxy failures may have no JSON body. Capture backoff headers before\n // parsing so SDK, CLI and MCP callers can still honor the server's delay.\n const retry = response.headers.get(\"retry-after\");\n const seconds = retry ? (/^\\d+$/.test(retry) ? Number(retry) : Math.max(0, Math.ceil((Date.parse(retry) - Date.now()) / 1000))) : undefined;\n const retryAfterSeconds = Number.isFinite(seconds) ? seconds : undefined;\n let value: Json;\n let cancelBody: () => void = () => {};\n try {\n // Keep an explicit cancellation listener through body consumption. Some\n // fetch transports can leave their body promise pending after headers.\n value = await new Promise<Json>((resolve, reject) => {\n cancelBody = () => reject(deadline.reason);\n deadline.addEventListener(\"abort\", cancelBody, { once: true });\n if (deadline.aborted) { cancelBody(); return; }\n response.json().then(resolve, reject);\n });\n }\n catch {\n // Fetch can resolve headers before the deadline interrupts the body.\n // Keep cancellation distinct from malformed JSON and never retry a write.\n deadline.throwIfAborted();\n throw new LeadpoetError(\"The API returned a non-JSON response\", response.ok ? 502 : response.status, \"invalid_response\", response.headers.get(\"x-request-id\") ?? undefined, undefined, retryAfterSeconds);\n } finally { deadline.removeEventListener(\"abort\", cancelBody); }\n if (!response.ok) {\n const error = object(value) && object(value.error) ? value.error : {};\n throw new LeadpoetError(typeof error.message === \"string\" ? error.message : \"API request failed\", response.status,\n typeof error.code === \"string\" ? error.code : \"request_failed\",\n typeof error.request_id === \"string\" ? error.request_id : response.headers.get(\"x-request-id\") ?? undefined,\n error.details, retryAfterSeconds);\n }\n const requestId = response.headers.get(\"x-request-id\") ?? undefined;\n return { value: wrapLegacy ? { data: value, request_id: requestId ?? \"\" } : value, requestId };\n }\n}\n"],
5
+ "mappings": ";;;AAAA,SAAS,kBAAkB,oBAAoB;AAC/C,SAAS,iBAAiB;AAE1B,SAAS,qBAAqB;;;ACFvB,IAAM,uBAAuB;AAAA,EAClC,EAAC,UAAU,QAAQ,cAAc,iBAAiB,QAAQ,aAAa,MAAM,iBAAiB,SAAS,qBAAqB,cAAc,EAAE,cAAc,CAAC,eAAe,EAAE,GAAG,SAAS,aAAa,SAAS,SAAQ;AAAA,EACtN,EAAC,UAAU,OAAO,cAAc,kCAAkC,QAAQ,8BAA8B,MAAM,uBAAuB,SAAS,oBAAoB,SAAS,aAAa,SAAS,OAAM;AAAA,EACvM,EAAC,UAAU,OAAO,cAAc,gBAAgB,QAAQ,aAAa,MAAM,gBAAgB,SAAS,oBAAoB,SAAS,aAAa,SAAS,OAAM;AAAA,EAC7J,EAAC,UAAU,OAAO,cAAc,oBAAoB,QAAQ,iBAAiB,MAAM,cAAc,SAAS,oBAAoB,SAAS,aAAa,SAAS,OAAM;AAAA,EACnK,EAAC,UAAU,OAAO,cAAc,yBAAyB,QAAQ,aAA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